Skip to content
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.tsx renders twice when using SSR and parallel routes #76410

Open
eiiot opened this issue Feb 24, 2025 · 0 comments
Open

layout.tsx renders twice when using SSR and parallel routes #76410

eiiot opened this issue Feb 24, 2025 · 0 comments
Labels
Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes. Performance Anything with regards to Next.js performance.

Comments

@eiiot
Copy link

eiiot commented Feb 24, 2025

Link to the code that reproduces this issue

https://github.com/eiiot/next-routes-rerendering

To Reproduce

  1. Build the application with next build
  2. Run with next start

Current vs. Expected behavior

RootLayout rendered is logged twice per request when it should only be logged once. This causes a bunch of issues, including fetching data from APIs twice.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020
  Available memory (MB): 32768
  Available CPU cores: 12
Binaries:
  Node: 20.11.0
  npm: 10.2.4
  Yarn: 4.1.0
  pnpm: N/A
Relevant Packages:
  next: 15.2.0-canary.71
  eslint-config-next: 15.2.0-canary.71
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.7.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Performance, Parallel & Intercepting Routes

Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local), Vercel (Deployed)

Additional context

This seems to be a fairly old issue: see this reddit thread discussing v14.

@github-actions github-actions bot added Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes. Performance Anything with regards to Next.js performance. labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes. Performance Anything with regards to Next.js performance.
Projects
None yet
Development

No branches or pull requests

1 participant