AntiPattern
Stale State in Closures
stale-state-closure-capture
State snapshots captured in callbacks, retries, or store setters get out of date because asynchronous dispatch and token refresh update values outside the closure scope. UI logic then reads wrong fields, wrong arrays, or old auth tokens.