Fixes extra full form re-renders that don't happen when using react-hook-form. Specifically, re-renders that happen because of formState changes, even when the user of the hook isn't watching formState values.
Below is a simple example showing that the entire form is being re-rendered on every key stroke into an input. This is happening because the validation mode is set to onChange and the formState.isValidating flag is changing on every key stroke (note that I haven't accessed formState.isValidating in the component, so the expected behavior is that the component does not re-render based on it).
Description
Fixes extra full form re-renders that don't happen when using react-hook-form. Specifically, re-renders that happen because of formState changes, even when the user of the hook isn't watching formState values.
Below is a simple example showing that the entire form is being re-rendered on every key stroke into an input. This is happening because the validation mode is set to onChange and the formState.isValidating flag is changing on every key stroke (note that I haven't accessed formState.isValidating in the component, so the expected behavior is that the component does not re-render based on it).
https://github.com/Code-Forge-Net/remix-hook-form/assets/5779535/5f53b399-c8a7-4029-9bee-36f099a3ccbc
Type of change
How Has This Been Tested?
After the changes:
https://github.com/Code-Forge-Net/remix-hook-form/assets/5779535/ed7035bb-145b-4b64-8285-d047d0c05cc4
Checklist: