Replies: 3 comments
-
While calling
To handle additional fields that are not "user-facing," use input type="hidden". |
Beta Was this translation helpful? Give feedback.
-
In our project, we use it to add additional state that we want to use across multiple components, much like a store. I want aware that in future versions, it is anticipated to undergo changes? @Moshyfawn |
Beta Was this translation helpful? Give feedback.
-
What kind of state are you storing in the non-existent fields? It seems like it would be more appropriate to store your external state in a React state / context. I can't promise you this behaviour is not going to change since this is not a supported RHF feature. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Version Number
7.45.4
Codesandbox/Expo snack
https://stackblitz.com/edit/stackblitz-starters-sou4kd?file=src%2FApp.js
Steps to reproduce
Expected behaviour
I would like to know if my usage is correct. I am using the setValue() function as shown in the code below. It seems to be working even though the field doesn't exist in the form.
What browsers are you seeing the problem on?
Chrome, Safari, Edge
Relevant log output
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions