-
-
Notifications
You must be signed in to change notification settings - Fork 493
Description
Description
Hi, thanks for your work on the library!
We're encountering a blocking issue when trying to migrate to [email protected]
to prepare for React 19.
Problem
When initialValues
are passed to the <Form />
, the corresponding fields registered via useField
initially return value: undefined
. This was not the case in earlier versions.
It seems that the field state is now derived via form.getFieldState()
during initialization here β but this runs before the field is registered here, so the field state is not available at that moment.
As a result:
Fields render with value: undefined on the first render. Components relying on the initial value (e.g., to initialize local state or trigger effects) fail or misbehave.
Expect result:
Fields render with defined value on initialize as it was before in v6.5.9
Sandbox Link
v6.5.9 https://codesandbox.io/p/sandbox/h7lk86
Logs:
v7.0.0 https://codesandbox.io/p/sandbox/6cd2fz
Logs: