react-strict-mode-async-race-condition

Installation
SKILL.md

React Strict Mode Async Race Condition

Problem

React Strict Mode double-executes effects (mount -> unmount -> mount) to help surface bugs. When an effect has side effects that consume one-time resources (e.g., removing startup data from a memory store), the second mount falls through to a slower async code path. If a fast path (e.g., WebSocket) from mount 1 completes before the slow path (e.g., API fetch) from mount 2, the slow path's setState call can overwrite the advanced state back to an earlier phase.

Context / Trigger Conditions

Related skills
Installs
1
First Seen
Apr 16, 2026