Pattern
State-Guarded Side Effects
state-transition-guarded-side-effects
A recurring state-guard motif where side effects must only occur on a specific state transition (e.g., false→true) or under strict browser-event conditions, otherwise updates happen at the wrong time or with missing preconditions.