useEffect not running on navigation between routes in App Router #78188
Unanswered
notestechme
asked this question in
Help
Replies: 1 comment 1 reply
-
Could you share more of what's going on? https://stackblitz.com/edit/nextjs-hhafptji?file=app%2Fpage.tsx,app%2Fposts%2F[slug]%2Fpage.tsx,app%2Flayout.tsx this one works fine, using Next 14 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Im migrating an old project to the App Router in Next.js (using the /app directory), and noticed that my
useEffect
doesnt seem to run again when navigating between routes.Here’s a simplified version:
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions