I have a form made using react hook form. It's a simple checkbox.

Everytime this value is checked or unchecked (onchange) I want to read out the value. Is there a possibility with react-hook-form to do this?
I have a form made using react hook form. It's a simple checkbox.

Everytime this value is checked or unchecked (onchange) I want to read out the value. Is there a possibility with react-hook-form to do this?
Give the checkbox a name and watch it with the watch property of the useForm hook. Like const newsLetterWatch = watch("subscibeToNewLetter", false);. Attaching code sandbox for a better understanding. I have given an initial value here. If you don't want that, you can use the useEffect hook to get the real-time value of each `register'ed field.
Refer: React Hook form - Watch, Set default values in React Hook Form, React-hook-form custom onChange handler in checkbox -> change is not registered