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.

Using Chakra UI with react-hook-form

See original GitHub issue

Howdy,

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:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

7reactions
segunadebayocommented, Oct 9, 2019

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:

  • In packages/chakra-ui-docs/pages, create a new file named recipes.mdx
  • Add this to the recipes with a link to the codesandbox
  • Submit a PR

I’d gladly merge your PR once you do this so I can include other recipes.

Thank you.

3reactions
simoncollinscommented, Dec 7, 2020

@mustafawm, I’ve updated the example to use formState and isSubmitting and updated to the latest versions of dependencies. It’s always a nice feeling to delete code!

Read more comments on GitHub >

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

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