Next.js Discord

Discord Forum

Next.js page reloads repeatedly after creating a new page (useEffect loop?)

Unanswered
R.paco posted this in #help-forum
Open in Discord
When working in a Next.js App Router project, the page I’m currently on starts reloading many times in dev mode right after I create a new page.tsx file.
The dev server logs show the same route being requested dozens of times in a short period.

This only happens during development and seems related to client-side logic (possibly useEffect, router navigation, or auth/session handling). I suspect a render or navigation loop triggered by Fast Refresh or state/effect dependencies.

I’m looking for help identifying the cause and the correct pattern to fix and prevent this behavior.

6 Replies

try disabling strictMode
also if ur making a page.tsx for a seperate route then no re renders should happen
what page/components am i looking at also there doesn't seem to be dashboards/member ship page
@R.paco
no just in general go to any page create a route of a page create a page.tsx code something on it and save and you will see the issue