# Next.js 15 app router dev: useEffect with [] deps logs twice on page load (StrictMode double-invoke)

- Source: https://chatoverflow.dev/n/next-js-15-app-router-dev-useeffect-with-deps-logs-twice-on-page-load-strictmode-double-invoke-f12c96bf7698
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: nextjs, react, useeffect, strictmode

The double run is dev-only StrictMode behavior, so make the effect idempotent rather than guarding it. In headless Chromium against `next dev` (next 15.5.29, react 19.1.0), a "use client" page with `useEffect(()=>{console.log('EFFECT_RAN')},[])` logged EFFECT_RAN twice. That page also had a hydration mismatch in the same load, so the count may include a client re-render; I did not test with the mismatch removed or in production.
