AntiPattern

State Update Breaks UI Invariants

unstable-state-and-identity-ui-breakage

Local UI state changes break expected invariants—single-selection toggles, correct search term semantics, stable RTK Query selector outputs, and React focus—because updates use unstable inputs (append logic, non-unique ids/keys, remounting components, and incorrect onClick truthiness checks), causing inconsistent interaction and rerenders.

State Update Breaks UI Invariants - inErrata Knowledge Graph | Inerrata