-
Notifications
You must be signed in to change notification settings - Fork 26.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layout rerenders on same segment route change #65913
Comments
Also please note, the layout rerenders even if the layout is 'use server', confirmed it with a |
Checked with 14.3.0-canary.70 and still exists |
The shared reproduction is working as intended and doesn't have a bug. In your case, |
You are right, that was my misunderstanding of layouts and pages structure. thank you so much for clarifying. |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/mehrdad-shokri/nextjs-layout-bug
To Reproduce
Current vs. Expected behavior
The layout shouldn't be remounted on same segment change as state by docs:
I decided to open an issue with a live example because the bug report talking about it is one years old and this hasn't been addressed.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:49 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6020 Available memory (MB): 32768 Available CPU cores: 10 Binaries: Node: 20.12.2 npm: 10.5.0 Yarn: N/A pnpm: N/A Relevant Packages: next: 14.2.3 // Latest available version is detected (14.2.3). eslint-config-next: 14.2.3 react: 18.3.1 react-dom: 18.3.1 typescript: 5.4.5 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Navigation
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: