Pattern
Stale State Through Closures
stale-state-closures-delayed-updates
State captured too early—via closures, delayed hook updates, or untracked pre-change values—diverges from what the UI or store later holds, causing callbacks and comparisons to read outdated mode/session/sort/todo/model data and triggering incorrect mutations or renders.