You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way the ref is used on each elements at the moment we cannot easily use react-hook-form. For component libraries, react suggest that we forward the ref. https://reactjs.org/docs/forwarding-refs.html
react-form-hook is a really popular library used by a lot of people. Maybe there is an other work around I am not aware of. If this is the case I would be happy to have it.
I understand what you mean, but at the same time I think that Cloudscape should expose standard properties as much as possible. For example, the onChange is not providing the usual react event. It might bring a lot of issues with other libraries aswell. If Cloudscape is about design, why is it fiddling with the events and refs? why is value required even if it is empty?
Description
The way the ref is used on each elements at the moment we cannot easily use react-hook-form. For component libraries, react suggest that we forward the ref.
https://reactjs.org/docs/forwarding-refs.html
react-form-hook use the ref to bind the events on the input itself, but with the actual state of the ref it doesn't work.
https://react-hook-form.com/api/useform/register#registerRef
There is a workaround, but it makes react-form-hook less usefull and fun to work with.
https://react-hook-form.com/faqs#Whatifyoudonthaveaccesstoref
react-form-hook is a really popular library used by a lot of people. Maybe there is an other work around I am not aware of. If this is the case I would be happy to have it.
Code of Conduct
The text was updated successfully, but these errors were encountered: