Skip to content

Commit edd66ff

Browse files
authored
Fix "Quick start" example in README (#23)
The `preventDefault` call was not preventing anything 😅
1 parent 30444ce commit edd66ff

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
@@ -397,8 +397,8 @@ const MyAwesomeForm = () => {
397397

398398
return (
399399
<form
400-
onSubmit={({ preventDefault }) => {
401-
preventDefault();
400+
onSubmit={(event: React.FormEvent) => {
401+
event.preventDefault();
402402

403403
submitForm(
404404
(values) => console.log("values", values), // all fields are valid

0 commit comments

Comments
 (0)