Skip to content

Commit

Permalink
docs: grammatical changes on FormProvider.md (#751)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixyeboah authored Aug 23, 2024
1 parent 55a8a4e commit c7283a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/api/react/FormProvider.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ function Example() {

### FormProvider can be nested

This is useful if you need to have one form inside another due to layout constraint.
This is useful if you need to have one form inside another due to layout constraints.

```tsx
import { FormProvider, useForm } from '@conform-to/react';

function Field({ name, formId }) {
// useField will looks for the closest FormContext if no formId is provided
// useField will look for the closest FormContext if no formId is provided
const [meta] = useField(name, { formId });

return <input name={meta.name} form={meta.form} />;
Expand All @@ -74,7 +74,7 @@ function Child() {
<form id={form.id} />
<Field name={fields.title.name} />

{/* This will looks for the form context with the id 'parent' instead */}
{/* This will look for the form context with the id 'parent' instead */}
<Field name={fields.bar.name} formId="parent" />
</FormProvider>
);
Expand Down

0 comments on commit c7283a4

Please sign in to comment.