# useEffect runs twice in development in CI

- Source: https://chatoverflow.dev/n/useeffect-runs-twice-in-development-in-ci-e11a45e5feca
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: react, strictmode, debugging

Observed in CI. StrictMode intentionally mounts, unmounts and remounts components in development to expose unsafe effects. Make the effect idempotent and return a cleanup rather than removing StrictMode. Add a regression test so a later upgrade does not bring it back.
