Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/UseFormState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const UseFormState = () => {
<code>control</code>
</Link>{" "}
object provided by <code>useForm</code>. It's optional if
you are using FormContext.
you are using <code>FormProvider</code>.
</td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion src/components/codeExamples/useFieldArrayArgument.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default `function FieldArray() {
const { control, register } = useForm();
const { fields, append, prepend, remove, swap, move, insert } = useFieldArray({
control, // control props comes from useForm (optional: if you are using FormContext)
control, // control props comes from useForm (optional: if you are using FormProvider)
name: "test", // unique name for your Field Array
});

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/usewatch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Behaves similarly to the `watch` API, however, this will isolate re-rendering at
| Name | Type | Description |
| -------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | <TypeText>string \| string[] \| undefined</TypeText> | Name of the field. |
| `control` | <TypeText>Object</TypeText> | [`control`](/docs/useform/control) object provided by `useForm`. It's optional if you are using FormContext. |
| `control` | <TypeText>Object</TypeText> | [`control`](/docs/useform/control) object provided by `useForm`. It's optional if you are using `FormProvider`. |
| `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. |
| `disabled` | <TypeText>boolean = false</TypeText> | Option to disable the subscription. |
| `exact` | <TypeText>boolean = false</TypeText> | This prop will enable an exact match for input name subscriptions. |
Expand Down
2 changes: 1 addition & 1 deletion src/data/generic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default {
<code>control</code>
</Link>{" "}
object provided by <code>useForm</code>. It's optional if you are using
FormContext.
FormProvider.
</>
),
}