feat: remove getFormProps to support React Native

This commit is contained in:
Corbin Crutchley
2023-09-03 01:00:45 -07:00
committed by Corbin Crutchley
parent 0d7e545c1d
commit 2a31bd8219
7 changed files with 38 additions and 64 deletions

View File

@@ -35,7 +35,13 @@ export default function App() {
<h1>Simple Form Example</h1>
{/* A pre-bound form component */}
<form.Provider>
<form {...form.getFormProps()}>
<form
onSubmit={(e) => {
e.preventDefault();
e.stopPropagation();
void form.handleSubmit();
}}
>
<div>
{/* A type-safe and pre-bound field component*/}
<form.Field