Repository navigation
Commit 2ab1b24
authored
docs: recommend useFormState for nested components with React Compiler (#1233)
useForm returns a stable object, so a compiled parent memoizes
<FormProvider {...methods}> and useFormContext().formState stays stale.
The migration guide now recommends useFormState({ control }) in nested
components and destructured methods such as getFieldState.1 parent 3ac1fe0 commit 2ab1b24
1 file changed
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
16 | 33 | | |
17 | 34 | | |
18 | 35 | | |
| |||
0 commit comments