Compatibility with react-hook-form library
See original GitHub issueI know is not a bug, but I’m trying to use grommet with the react-hook-form library instead of formik. The react-hook-form is increasing its popularity and I think is a good way to manage forms in term of code quality and performance, but grommet seems to not be totally compatible with it.
Anyone tried react-hook-form with grommet? Any suggestion? I’m trying to use the Select
component and the forwardRef
prop to pass the register
function (as needed by react-hook-form), but when I click on the select on browser everything crash, causing a blank page.
Here a codesandbox: https://codesandbox.io/s/grommet-select-not-working-with-react-hook-form-5rjsb
If you click twice on the second Select everything will crash.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Advanced Usage - React Hook Form
React Hook Form embraces uncontrolled components and is also compatible with controlled components. Most UI libraries are built to support only controlled ...
Read more >react-hook-form - npm
Performant, flexible and extensible forms library for React Hooks. ... Start using react-hook-form in your project by running `npm i react-hook-form`.
Read more >React Hook Form: the best form library? - DEV Community
This is the main reason why I love React Hook Form: it has the smallest amount of code of any other library: you...
Read more >React Hook Form: A guide with examples - LogRocket Blog
Another great feature offered by React Hook Form is its painless integration with UI libraries because most libraries support the ref attribute.
Read more >Unlock the Secret Power of React Hook Form - CopyCat Blog
Small bundle size · Form component renders lesser than Formik's · Easy to integrate with any third UI libraries · Uses uncontrolled method...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am working on a package for Use React Hook Form with Grommet http://npmjs.com/package/grommet-hook-form https://github.com/babbarankit/grommet-hook-form I have done most work offline. Just released TextInput today, will be releasing other items too this week. Just in case it helpful for others.
Any updates on this by any chance? I am building an app with lots of long forms. This can be really helpful. I went through Formik integration documentation but react-hook-form looks simpler. Thanks!