You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Now useFieldValidator hook does not re-run validator function when reference to it changes. In addition, it does not call validator function on first render.
Expected behavior
It is expected that validator function will be called each time reference to it changes.
Additional context
In addition, we must decide if bindings to yup are necessary. Maybe it is better to get rid of this dependency.
The text was updated successfully, but these errors were encountered:
Things to remember after migrating to new useFieldValidator
All utility hooks (useIntegerField, etc...) must be refactored to retain stable reference on validate function that is being passed to useFieldValidator.
Describe the bug
Now
useFieldValidator
hook does not re-runvalidator
function when reference to it changes. In addition, it does not callvalidator
function on first render.Expected behavior
It is expected that
validator
function will be called each time reference to it changes.Additional context
In addition, we must decide if bindings to
yup
are necessary. Maybe it is better to get rid of this dependency.The text was updated successfully, but these errors were encountered: