question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compatibility with react-hook-form library

See original GitHub issue

I 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:open
  • Created 4 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
babbarankitcommented, Sep 15, 2020

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.

2reactions
krishna-404commented, Jun 1, 2021

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found