Skip to content
Discussion options

You must be logged in to vote

@DanielMarkiel

This is the expected behavior for watch() method on field array of react-hook-form latest version and it has been documented in here:

https://react-hook-form.com/docs/useform/watch

Field array data will be the same reference array inside form state to avoid re-rendering therefore using useMemo or useEffect with change deps will not work.

Just remove the use of useMemo to achieve your expected behavior.

Working demo: https://codesandbox.io/s/epic-swanson-gtqhsx?file=/src/App.tsx

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DanielMarkiel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #10928 on September 14, 2023 08:42.