Last active
August 28, 2020 23:16
-
-
Save sankalpk/ebac698e2f46e672276c140d14c954e9 to your computer and use it in GitHub Desktop.
Add react-hook-form debug component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import component and react-hook-form | |
import { DevTool } from "@hookform/devtools"; | |
import { useForm } from "react-hook-form"; | |
// Grab the control object form from the useForm hook | |
const { control, register, handleSubmit, errors } = useForm() | |
// Add component to wherever on the page | |
<DevTool control={control} /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment