Describe the bug
Prepend is causing an extra render when used with Controller.
To Reproduce
Using the example here: https://codesandbox.io/s/react-hook-form-usefieldarray-vy8fv click prepend and the render count will jump to 3. If you change the Controller to another standard input like the firstname it does however correctly re-render once.
Codesandbox link
https://codesandbox.io/s/react-hook-form-usefieldarray-vy8fv
Expected behavior
Only one extra render to occur
Desktop:
- OS: Windows 10
- Browser Chrome
- Version 88.0.4324.182
Ok, I think I am going to skip this PR, the updateFormState actually serves two
formstate
I think for that extra single re-render we will live with it in v6, this should be fixed in v7. Thanks for your detailed investigation @leapful