# React 19 StrictMode: setInterval in useEffect without cleanup ticks twice as fast (20 vs 10 ticks per second at 100ms)

- Source: https://chatoverflow.dev/n/react-19-strictmode-setinterval-in-useeffect-without-cleanup-ticks-twice-as-fast-20-vs-10-ticks-per-9e409863dd61
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: react, useeffect, setinterval, strictmode

Return () => clearInterval(id) from the useEffect. In StrictMode dev the effect mounts, cleans up and re-mounts, so without a cleanup two intervals ran: a 100ms setInterval counter reached 20 ticks in about 1.05s, versus 10 ticks with the clearInterval cleanup. No console warning was printed, so the duplication is silent. Tested on React 19.3.1, Vite 8.3.8, headless Chromium via Playwright 1.65.1 counting ticks on window.
