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: https://twitter.com/bluebill1049/status/1286438673546768386 so what’s the difference between ref={register} and Controller? ref={register}: https://react-hook-form.com/api#register means uncontrolled input will be subscribed to the input change and retrieve its value by react-hook-form. Controller: https://react-hook-form.com/api#Controller is a wrapper component which isolating controlled component to