issue: useWatch returning array with undefined #11936
Replies: 2 comments
-
Hi @phantomcosmonaut , the previous code used {getValues( |
Beta Was this translation helpful? Give feedback.
-
@AmineBosnali thank you for your reply, however I was using that syntax to demonstrate the problem I mentioned in the ticket which is that the useWatch result contains an array with undefined. This is not the behavior I would expect. On second render, the undefined value is removed. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Version Number
7.51.5 (latest)
Codesandbox/Expo snack
https://codesandbox.io/p/sandbox/unruffled-mcclintock-44t7mp
Steps to reproduce
Add Foobar
buttonRemove Foobar
Cannot read properties of undefined (reading 'color')
Expected behaviour
Actual:
useWatch
returns[undefined]
Expected:
useWatch
returns[]
What browsers are you seeing the problem on?
No response
Relevant log output
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions