Skip to content

Commit a941bb5

Browse files
committed
update on legacy
1 parent fa756f7 commit a941bb5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/ApiGallery.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ export default function ApiGallery() {
1717
)
1818

1919
if (version !== 7) {
20-
router.push(`https://legacy.react-hook-form.com/v${version}/api`)
20+
router.push(
21+
`https://react-hook-form-website-git-leagcy-hook-form.vercel.app/${version}/api`
22+
)
2123
} else {
2224
router.push(`/v${version}/docs/`)
2325
}

src/content/docs/useform/formstate.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This object contains information about the entire form state. It helps you to ke
3333
| `validatingFields` | <TypeText>object</TypeText> | Capture fields which are getting async validation. |
3434
| `errors` | <TypeText>object</TypeText> | An object with field errors. There is also an [ErrorMessage](/docs/useformstate/errormessage) component to retrieve error message easily. |
3535
| `disabled` | <TypeText>boolean</TypeText> | Set to true if the form is disabled via the disabled prop in [useForm](/docs/useform). |
36-
| `isReady` | <TypeText>boolean</TypeText> | Set to true when `formState` subscription setup is ready. <ul><li><p>Renders children before the parent completes setup. If you're using `useForm` methods (eg. `setValue`) in a child before the subscription is ready, it can cause issues. Use an `isReady` flag to ensure the form is initialized before updating state from the child.</p><CodeArea withOutCopy rawData={`const {\n setValue,\n formState: { isReady }\n} = useForm();\n\n// Parent component: ✅ \nuseEffect(() => setValue('test', 'data'), []) \n\n// Children component: ✅ \nuseEffect(() => isReady && setValue('test', 'data'), [isReady])`}/></li></ul> |
36+
| `isReady` | <TypeText>boolean</TypeText> | Set to true when `formState` subscription setup is ready. <ul><li><p>Renders children before the parent completes setup. If you're using `useForm` methods (eg. `setValue`) in a child before the subscription is ready, it can cause issues. Use an `isReady` flag to ensure the form is initialized before updating state from the child.</p><CodeArea withOutCopy rawData={`const {\n setValue,\n formState: { isReady }\n} = useForm();\n\n// Parent component: ✅ \nuseEffect(() => setValue('test', 'data'), []) \n\n// Children component: ✅ \nuseEffect(() => isReady && setValue('test', 'data'), [isReady])`}/></li></ul> |
3737

3838
<Admonition type="important" title="Rules">
3939

0 commit comments

Comments
 (0)