Skip to content

Commit 77e1e16

Browse files
docs: format useFormContext note
1 parent 549839d commit 77e1e16

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/content/docs/useformcontext.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ const methods = useFormContext() // retrieve those props
3535
You need to wrap your form with the [`FormProvider`](/docs/formprovider)
3636
component for `useFormContext` to work properly.
3737

38-
If you need to subscribe to form state values like `errors`, `isDirty`, or
39-
`dirtyFields` inside a `FormProvider` tree, use
40-
[`useFormState`](/docs/useformstate) instead of destructuring `formState`
41-
from `useFormContext()`. `formState` is wrapped with a Proxy, so you should
42-
read the specific state you want to subscribe to before render.
38+
If you need to subscribe to form state values like `errors`, `isDirty`, or
39+
`dirtyFields` inside a `FormProvider` tree, use
40+
[`useFormState`](/docs/useformstate) instead of destructuring `formState`
41+
from `useFormContext()`. `formState` is wrapped with a Proxy, so you should
42+
read the specific state you want to subscribe to before render.
43+
4344
</Admonition>
4445

4546
**Example:**

0 commit comments

Comments
 (0)