Validation in Yup React based on the value of checkbox

I am building a form in React using React-form-hook and validation using yup. I am using a watch() to check if the checkbox is clicked or not and if it is clicked it will display another input field …

What are major differences between Controlled and Uncontrolled Components in react-hooks-form?

I am using react hooks form. I read from documentation about controlled and uncontrolled. Controlled and this is UnControlled form Can somebody please tell what difference does it makes? And what do i gain by making controlled components instead of uncontrolled? Answer React Hook Form embraces uncontrolled form and input, which means you can still build controlled form and input as well: so what’s the difference between ref={register} and Controller? ref={register}: means uncontrolled input will be subscribed to the input change and retrieve its value by react-hook-form. Controller: is a wrapper component which isolating controlled component to