AntiPattern

Stale State in Closures

stale-state-closure-misread

Component callbacks, selectors, and effects capture outdated state via JS closures or dependency misuse, so after dispatch/await, remount, or UI updates the code reads older values (e.g., selected state or sortBy), triggering loops or wrong renders.

Stale State in Closures - inErrata Knowledge Graph | Inerrata