The library offers you the possibility to watch one, multiple or all values of a form. You can watch values on change or on blur.
In this example, we are watching values of a simple form with the two hooks provider for this: useOnChangeValues
and useOnBlurValues
.
The watch is scoped on field name. A render will only be done when the value is updated
You can also watch all values of a form by using the following code
Global watching is, by definition, not scoped to some field, so the hook will re-render every time a value in the form is updated. This can cause performance issues in a large form.