Form Component
The Form
component is the wrapper for all the inputs and is where the context
for your form is held. The only required props for the component are
initialValues
that is the initial value for the form state and a onSubmit
callback that will be called when the user submits a valid form.
import { Form } from "@adeattwood/react-form"<ForminitialValues={{ firstname: "", lastname: "" }}onSubmit={({ formState }) => api.createUser(formState)}><FirstNameInput /><LastNameInput /></Form>