ta
TanStack
GitHub
form
Workspace
GitHub
CI Pipeline Executions
Current execution
Succeeded
fix/keyed-field-stale-on-array-removal-2238
Runs and Agents
Timeline
Beta
Configuration
Self-Healing CI
Project Graph
Circular Dependencies
Enterprise
Resource Usage
Analysis
Conformance
Enterprise
Runs
Current run
Succeeded
Tasks
Resource Usage
Insights
Compare tasks
Analytics
Sign in
Toggle sidebar
fix(react-form): use fresh FieldApi in current render on name change When a field's `name` changes (e.g. a non-last item is removed from a stably-keyed array), `useField` created a new FieldApi via `setFieldApi` during render but continued the current render pass with the stale instance. React discards that pass, but the render prop still runs to completion once with the stale FieldApi, whose store derives `undefined` for the path that no longer exists at the old index. This briefly surfaces `state.value === undefined` for surviving array items, crashing render code that treats the value strictly. Adjust state during render but also use the freshly created FieldApi for the remainder of this render, so the field reads state at its current `name`. Keeps the setState-based identity (React Compiler safe) while restoring the pre-1.27.0 behavior. Closes #2238
nx affected --targets=test:sherif,test:knip,test:docs,test:eslint,test:lib,test:types,test:build,build --parallel=3
⌘K
Succeeded
nx affected --targets=test:sherif,test:knip,test:docs,test:eslint,test:lib,test:types,test:build,build --parallel=3
Click to copy
cbc25b1f
2240
92%
Cache hits
48 of 52 tasks used cache.
Atomizer enabled
23 groups of tasks optimized.
GitHub
form
Workspace