Skip to content

Commit

Permalink
Fix "Quick start" example in README (#23)
Browse files Browse the repository at this point in the history
The `preventDefault` call was not preventing anything 😅
  • Loading branch information
guizmaii authored Jul 15, 2023
1 parent 30444ce commit edd66ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ const MyAwesomeForm = () => {

return (
<form
onSubmit={({ preventDefault }) => {
preventDefault();
onSubmit={(event: React.FormEvent) => {
event.preventDefault();

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

0 comments on commit edd66ff

Please sign in to comment.