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

Parallel Route with Slug makes page render twice #74841

Open
canopy-cj opened this issue Jan 13, 2025 · 0 comments
Open

Parallel Route with Slug makes page render twice #74841

canopy-cj opened this issue Jan 13, 2025 · 0 comments
Labels
Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes. Performance Anything with regards to Next.js performance.

Comments

@canopy-cj
Copy link

canopy-cj commented Jan 13, 2025

Link to the code that reproduces this issue

https://github.com/canopy-cj/Nextjs-Parallel-Route-Issue

To Reproduce

  1. Run build (npm run build) and start (npm run start)
  2. Navigate to main page (http:localhost:3000). You should see Pokemon List page is rendered once.
  3. Click on one of pokemon. You should see Pokemon page is rendered twice.

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

@canopy-cj canopy-cj added the bug Issue was opened via the bug report template. label Jan 13, 2025
@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 Jan 13, 2025
@samcx samcx removed the bug Issue was opened via the bug report template. label Jan 16, 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

2 participants