Skip to content

Commit 1058a62

Browse files
replace FormContext by FormProvider (#1047)
1 parent 16f7ae5 commit 1058a62

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/components/UseFormState.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const UseFormState = () => {
7171
<code>control</code>
7272
</Link>{" "}
7373
object provided by <code>useForm</code>. It's optional if
74-
you are using FormContext.
74+
you are using <code>FormProvider</code>.
7575
</td>
7676
</tr>
7777
<tr>

src/components/codeExamples/useFieldArrayArgument.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export default `function FieldArray() {
22
const { control, register } = useForm();
33
const { fields, append, prepend, remove, swap, move, insert } = useFieldArray({
4-
control, // control props comes from useForm (optional: if you are using FormContext)
4+
control, // control props comes from useForm (optional: if you are using FormProvider)
55
name: "test", // unique name for your Field Array
66
});
77

src/content/docs/usewatch.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Behaves similarly to the `watch` API, however, this will isolate re-rendering at
1515
| Name | Type | Description |
1616
| -------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
1717
| `name` | <TypeText>string \| string[] \| undefined</TypeText> | Name of the field. |
18-
| `control` | <TypeText>Object</TypeText> | [`control`](/docs/useform/control) object provided by `useForm`. It's optional if you are using FormContext. |
18+
| `control` | <TypeText>Object</TypeText> | [`control`](/docs/useform/control) object provided by `useForm`. It's optional if you are using `FormProvider`. |
1919
| `defaultValue` | <TypeText>unknown</TypeText> | default value for `useWatch` to return before the initial render.<br/><br/>**Note:** the first render will always return `defaultValue` when it's supplied. |
2020
| `disabled` | <TypeText>boolean = false</TypeText> | Option to disable the subscription. |
2121
| `exact` | <TypeText>boolean = false</TypeText> | This prop will enable an exact match for input name subscriptions. |

src/data/generic.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default {
4949
<code>control</code>
5050
</Link>{" "}
5151
object provided by <code>useForm</code>. It's optional if you are using
52-
FormContext.
52+
FormProvider.
5353
</>
5454
),
5555
}

0 commit comments

Comments
 (0)