surevine / govuk-react-jsx

govuk-frontend compatible React components
https://govuk-react-jsx.netlify.app/
MIT License
3 stars 0 forks source link

Looking for an updated example of react-hook-form #105

Open brightpixels opened 3 years ago

brightpixels commented 3 years ago

Hello, The current example of react-hook-form is broken. Could you please update it or give guidance. https://github.com/surevine/govuk-react-jsx-examples/blob/master/src/forms/ReactHookForm.js Thanks

andymantell commented 3 years ago

I will update it when I can but I'm not able to give a prompt response to this unfortunately. I don't believe anything is broken in this library that makes it incompatible with react-hook-form, but react-hook-form changed enough that my example code no longer worked. It wasn't completely broken - it was just the validation wasn't working I think.

Is there anything in the react-hook-form docs you can use to work out what the changes are and whether you are able to fix this yourself?

brightpixels commented 3 years ago

Thanks. Closing for now and will reopen or raise an issue for more specific issues. If all good, I will raise PR on your example.

andymantell commented 3 years ago

Thanks @brightpixels.

I'm actually going to reopen this ticket though as a reminder as I do need at some point to fix that example. I hastily commented it out because it was broken and didn't have time to do anything better with it...