Closed iskrenantonov closed 5 years ago
Hi, can you show your code?
<ValidatorForm id="form-login" onSubmit={ this.onSubmit } noValidate="novalidate"
onSubmit() { const { formData } = this.state;
this.props.login({
username: formData['username'],
password: formData['password']
});
}
Can you reproduce your issue on https://codesandbox.io ?
https://codesandbox.io/s/08jx447ln?fontsize=14 It seems the event is nulled before to be passed to my component's onSubmit method, so it's throwing warnings. I'll fix it on my side. Thank you very much :) PS I forgot to save the snippet, it's working now :)
I am using react-material-ui-form-validator (which depends on react-form-validator-core) in one of my projects and every form throws a warning when submitting like this:
Warning: This synthetic event is reused for performance reasons. If you're seeing this, you're accessing the method
preventDefault
on a released/nullified synthetic event. This is a no-op function. If you must keep the original synthetic event around, use event.persist(). See https://fb.me/react-event-pooling for more information.This happens in ValidatorForm.jsx in the submit method.
react - v16.8.4 react-material-ui-form-validator - v2.0.7 react-form-validator-core - v0.6.2