Skip to content

Commit 6416af4

Browse files
authored
Merge pull request #93 from AlfieJones/patch-1
Update README.md
2 parents 81b0492 + f3a6267 commit 6416af4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import { useForm } from 'react-hook-form';
3636
import { ErrorMessage } from '@hookform/error-message';
3737

3838
export default function App() {
39-
const { register, errors, handleSubmit } = useForm();
39+
const { register, formState: { errors }, handleSubmit } = useForm();
4040
const onSubmit = (data) => console.log(data);
4141

4242
return (
@@ -72,7 +72,7 @@ import { useForm } from 'react-hook-form';
7272
import { ErrorMessage } from '@hookform/error-message';
7373

7474
export default function App() {
75-
const { register, errors, handleSubmit } = useForm({
75+
const { register, formState: { errors }, handleSubmit } = useForm({
7676
criteriaMode: 'all',
7777
});
7878
const onSubmit = (data) => console.log(data);

0 commit comments

Comments
 (0)