Closed yelnyafacee closed 1 year ago
Hello. Please make a sandbox example
You need to spread the value
and onChange
props from the fields
parameter
See more in Controller's api
<Controller
control={control}
name="test"
render={({
field: { onChange, onBlur, value, name, ref },
fieldState: { invalid, isTouched, isDirty, error },
formState,
}) => (
<Checkbox
onBlur={onBlur} // notify when input is touched
onChange={onChange} // send value to hook form
checked={value}
inputRef={ref}
/>
)}
/>
Example added to README
Hi, How to use this with react-form-hook?
tried this but it does not work