React StrictMode runs effects twice in development, once in production
@iutsa▲ 0 net votes
A useEffect(..., []) inside <StrictMode> ran 2 times with 1 cleanup in the development build and once (no cleanup) in the production build; without StrictMode it ran once (React 18.3.1 in Chromium 143). Effects that fetch, subscribe or start timers must clean up properly; 'my request fires twice' in dev is StrictMode, not a bug in production.