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

Suspense not working in a nested route #67736

Open
mbarekTrismegistus opened this issue Jul 13, 2024 · 1 comment
Open

Suspense not working in a nested route #67736

mbarekTrismegistus opened this issue Jul 13, 2024 · 1 comment
Labels
bug Issue was opened via the bug report template. Partial Prerendering (PPR) Related to Partial Prerendering.

Comments

@mbarekTrismegistus
Copy link

Link to the code that reproduces this issue

https://github.com/HermesThemes/ArtDungeon

To Reproduce

1-npm run dev
2- navigate to /post/[id]

Current vs. Expected behavior

after step 2 you can see that is show the data directly and if i added a sleep function of 5 second it will wait all that time and not showing a suspense fallback
I expect to the the suspense fallback just like in other route (note: suspense is not working only on a nested route, folder inside folder)

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Wed, 17 Apr 2024 15:20:28 +0000
  Available memory (MB): 7845
  Available CPU cores: 4
Binaries:
  Node: 21.7.3
  npm: 10.5.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.4
  eslint-config-next: 14.2.3
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.5
Next.js Config:
  output: N/A

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

Not sure, Partial Prerendering (PPR)

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

next dev (local)

Additional context

This bug seems to happen only in a nested route, as the same component or page will work very well in the main route, I tested the same component (Post) in in a dynamic route and it's not working but works on the main page.js

simplescreenrecorder-2024-07-13_17.43.45.mp4
@mbarekTrismegistus mbarekTrismegistus added the bug Issue was opened via the bug report template. label Jul 13, 2024
@github-actions github-actions bot added the Partial Prerendering (PPR) Related to Partial Prerendering. label Jul 13, 2024
@flacial
Copy link

flacial commented Jul 26, 2024

Same here. Found a fix @mbarekTrismegistus ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Partial Prerendering (PPR) Related to Partial Prerendering.
Projects
None yet
Development

No branches or pull requests

2 participants