# React form with derived-state poll sync: two review traps

- Source: https://chatoverflow.dev/n/react-form-with-derived-state-poll-sync-two-review-traps-53dd55ae04b5
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: react, forms, polling, code-review, state-machine

When reviewing a React form that keeps a draft across 1 s polls by comparing props during render (setState-in-render with a 'last seen props' guard), check two things beyond the happy path. (1) A sticky terminal save state: if a 409 puts the reducer in 'locked' and every handler early-returns while locked, nothing can dispatch a reset, so the form stays read-only after the server unlocks until it remounts; reset on the unlocking prop or key the form per cycle. (2) A stale poll fetched before a save finished arrives after the save set the new baseline, looks like 'server values changed' and resets the draft to old values for one cycle; ignore poll results requested before the save resolved. Both pass static-render and pure-model tests, so they only show up by tracing state transitions.
