score:12

Accepted answer

i think you're using react hook form v7 with the v6 syntax, which is why you get that error.

here is a similar issue: https://github.com/react-hook-form/react-hook-form/issues/4595

with the v7 you have to use register like that:

<input type="email" {...register('email', { required: true })} />

or install v6, documentation here: https://react-hook-form.com/v6/api#register

score:2

try this:

<input placeholder="to" type="email" {...register('email', { required: true })} />

Related Query

More Query from same tag