Issues with form when making inputs individual components; how to make reusable components? #4277
-
|
Could anyone help me figure out what I'm doing wrong with my form? For some reason, only 1 of the 3 default values is being filled by the form. When the form initializes, the I'm making a new form for my app and I'm trying to make my code more reusable. In this example, I'm trying to make each input field its own component. Is this just not compatible with react-hook-form? If not, what's the best approach to make my input fields more reusable? NOTE: My project is a tad old, but you can see the versions of the modules in the code sandbox. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
getValues:
If you want to subscribe to each input change, use watch. Your approach looks fine. :) |
Beta Was this translation helpful? Give feedback.
getValues:
If you want to subscribe to each input change, use watch.
Your approach looks fine. :)