Skip to content

Commit f1c1219

Browse files
committed
fix mobile view with nest contnet
1 parent 5b3351d commit f1c1219

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/content/docs/useformcontext.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ description: React Context API for hook form
44
sidebar: apiLinks
55
---
66

7+
<SelectNav
8+
options={[
9+
{
10+
label: "FormProvider",
11+
value: "/docs/formprovider",
12+
},
13+
]}
14+
/>
15+
716
## \</> `useFormContext:` <TypeText>Function</TypeText>
817

918
This custom hook allows you to access the form context. `useFormContext` is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop.

src/content/docs/useformstate.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ description: Subscribe to form state update
44
sidebar: apiLinks
55
---
66

7+
<SelectNav
8+
options={[
9+
{
10+
label: "ErrorMessage",
11+
value: "/docs/errormessage",
12+
},
13+
]}
14+
/>
15+
716
## \</> `useFormState:` <TypeText>`({ control: Control }) => FormState`</TypeText>
817

918
This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.

0 commit comments

Comments
 (0)