How to prevent setValue from rerendering the whole form for field registered dynamically? #1980
-
Hi everyone, I'm trying to use setValue and register inside dynamically rendered elements, I've made a quick codesandbox to illustrate my issue. I have an input inside a component that registers a custom made input that uses setValue and uses that value elsewhere in the same component. My codesandbox works great and when I submit my form I do have access to all my values, but the problem is when enabling |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The re-render is caused by your watch |
Beta Was this translation helpful? Give feedback.
The re-render is caused by your watch
const item = watch(
${id}, {});