From e805cd9f51c3cfcab04864955099b93039a06032 Mon Sep 17 00:00:00 2001 From: Jules Ivanic Date: Fri, 14 Jul 2023 14:16:30 +0400 Subject: [PATCH] Fix "Quick start" example in README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `preventDefault` call was not preventing anything 😅 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a1f84e2..dce7d90 100644 --- a/README.md +++ b/README.md @@ -397,8 +397,8 @@ const MyAwesomeForm = () => { return (
{ - preventDefault(); + onSubmit={(event: React.FormEvent) => { + event.preventDefault(); submitForm( (values) => console.log("values", values), // all fields are valid