You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React crashes if you set a Field level defaultValue on a conditionally rendered Field.
Cannot update a component (`App`) while rendering a different component (`Field`). To locate the bad setState() call inside `Field`, follow the stack trace as described in https://react.dev/link/setstate-in-render
at Field (https://tkj4dz.csb.app/node_modules/@tanstack/react-form/dist/esm/useField.js:43:23)
at APIField
at div
at form
at div
at App
Describe the bug
React crashes if you set a Field level defaultValue on a conditionally rendered Field.
Your minimal, reproducible example
https://codesandbox.io/p/sandbox/optimistic-golick-tkj4dz
Steps to reproduce
Expected behavior
Should not crash
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
TanStack Form adapter
None
TanStack Form version
v0.41.3
TypeScript version
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: