File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -215,17 +215,17 @@ export function useForm<
215
215
// stable reference of form options, needs to be tracked so form.update is only called
216
216
// when props are changed.
217
217
const stableOptsRef = useRef < typeof opts > ( opts )
218
- if ( ! evaluate ( opts , stableOptsRef . current ) ) {
219
- stableOptsRef . current = opts
220
- }
221
218
222
219
/**
223
220
* formApi.update should not have any side effects. Think of it like a `useRef`
224
221
* that we need to keep updated every render with the most up-to-date information.
225
222
*/
226
223
useIsomorphicLayoutEffect ( ( ) => {
227
- formApi . update ( stableOptsRef . current )
228
- } , [ stableOptsRef . current ] )
224
+ if ( ! evaluate ( opts , stableOptsRef . current ) ) {
225
+ stableOptsRef . current = opts
226
+ formApi . update ( opts )
227
+ }
228
+ } )
229
229
230
230
return formApi
231
231
}
You can’t perform that action at this time.
0 commit comments