File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ import { useForm } from 'react-hook-form';
36
36
import { ErrorMessage } from ' @hookform/error-message' ;
37
37
38
38
export default function App () {
39
- const { register , errors , handleSubmit } = useForm ();
39
+ const { register , formState : { errors } , handleSubmit } = useForm ();
40
40
const onSubmit = (data ) => console .log (data);
41
41
42
42
return (
@@ -72,7 +72,7 @@ import { useForm } from 'react-hook-form';
72
72
import { ErrorMessage } from ' @hookform/error-message' ;
73
73
74
74
export default function App () {
75
- const { register , errors , handleSubmit } = useForm ({
75
+ const { register , formState : { errors } , handleSubmit } = useForm ({
76
76
criteriaMode: ' all' ,
77
77
});
78
78
const onSubmit = (data ) => console .log (data);
You can’t perform that action at this time.
0 commit comments