+| `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(() => isReady && setValue('test', 'data'), []) \n\n// Children component: ✅ \nuseEffect(() => isReady && setValue('test', 'data'), [isReady])`}/></li></ul> |
0 commit comments