Answers for "path.split is not a function react hook use form"

1

path.split is not a function react hook use form

react-hook-form updated to 7.0.0 from 6.X.X and has breaking changes:

You have to replace all ref={register} with {...register('value_name')}

Version 6.X.X:

<input ref={register({ required: true })} name="test" />

Version 7.0.X:

<input {...register('test', { required: true })} />
Posted by: Guest on July-09-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language