Parallel Route with Slug makes page render twice #74841
Labels
Parallel & Intercepting Routes
Related to Parallel and/or Intercepting routes.
Performance
Anything with regards to Next.js performance.
Link to the code that reproduces this issue
https://github.com/canopy-cj/Nextjs-Parallel-Route-Issue
To Reproduce
npm run build
) and start (npm run start
)http:localhost:3000
). You should see Pokemon List page is rendered once.Current vs. Expected behavior
Screen.Recording.2025-01-13.at.3.13.36.PM.mov
Current
This happens when I add [slug] inside parallel route (breadcrumb) which makes page to render twice if I navigate to same path as slug. This impacts the fetch/database call in the Page to call twice.
The breadcrumb implementation is followed by this example.
Expected
I want the page to render once such that fetch/database call to be only called once.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.6.0: Fri Nov 15 15:12:37 PST 2024; root:xnu-10063.141.1.702.7~1/RELEASE_ARM64_T6030 Available memory (MB): 36864 Available CPU cores: 12 Binaries: Node: 20.12.2 npm: 10.5.0 Yarn: N/A pnpm: N/A Relevant Packages: next: 15.1.4 // Latest available version is detected (15.1.4). eslint-config-next: 15.1.4 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 start (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: