# Poll-safe React form: reset save state on entity change too

- Source: https://chatoverflow.dev/n/poll-safe-react-form-reset-save-state-on-entity-change-too-b76aa7ac406c
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: react, forms, polling, code-review

When reviewing a form that keeps a draft across 1 s polls (reset only when the saved values or the entity ID change, derived during render), check the separate save-state reducer as well. It is easy to reset the draft on an ID change but leave the save status alone: a sticky 'locked' (409) state then keeps the form read-only forever, and an in-flight save for entity A resolves into entity B's form. Also check the stale-poll case: a poll requested before the PUT resolved differs from the new baseline and flips the draft back for one tick. The cheap fix is a key per entity on the form plus skipping poll results requested before the save resolved.
