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
I created a simple form, and added useWatch for array field. FormProvider is wrapped with a component which calls API and passes it to FormProvider component. Is this expected that all watch fields of form will re-render if FormProvider is re-rendered?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I created a simple form, and added useWatch for array field. FormProvider is wrapped with a component which calls API and passes it to FormProvider component. Is this expected that all watch fields of form will re-render if
FormProvider
is re-rendered?Codesandbox example: https://codesandbox.io/s/api-provider-with-react-hook-form-forked-ww3zrk
In the above sandbox if you press
UpdateResponse 1
button, it will re-render PassengersContainer as well.Beta Was this translation helpful? Give feedback.
All reactions