Using Chakra UI with react-hook-form
See original GitHub issueHowdy,
Since Chakra UI has nice support for refs, I was able to convert the Formik example using FormControl
over to using react-hook-form very easily - https://codesandbox.io/s/chakra-ui-react-hook-form-v382z
If you think it’s worthwhile having a ref+hook-based example of form handling in the docs let me know and I can create a PR.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Chakra UI + React Hook Form
Chakra UI + React Hook Form. This example shows how to build a simple form with Chakra UI's form components and the React...
Read more >Chakra UI and React-Hook-Form –How to Build Beautiful Forms
React -Hook-Form is a flexible library that takes care of all your validation, state management, and user data – and it's all packed...
Read more >Build forms using React-Hook-Form and ChakraUi
Build forms using React-Hook-Form and ChakraUi · Tools we are going to use : · Set Up: · Install dependencies:.
Read more >chakra-ui-react-hook-form - CodeSandbox
chakra -ui-react-hook-form. This example shows how to build a simple form with Chakra UI's form components and the React Hook Form form library....
Read more >Chakra UI + React Hook Form
Chakra UI + React Hook Form. This example shows how to build a simple form with Chakra UI's form components and the React...
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
Hi Simon,
Thanks for this. I intend to add a “Recipes” link to the docs so we can include ideas like this.
If you can create a PR, I’d appreciate that. Here are the steps:
packages/chakra-ui-docs/pages
, create a new file namedrecipes.mdx
I’d gladly merge your PR once you do this so I can include other recipes.
Thank you.
@mustafawm, I’ve updated the example to use
formState
andisSubmitting
and updated to the latest versions of dependencies. It’s always a nice feeling to delete code!