Suspense boundary behavior for transitions, initial load, and non suspending components. #53916
Closed
1 task done
Labels
bug
Issue was opened via the bug report template.
Linking and Navigating
Related to Next.js linking (e.g., <Link>) and navigation.
stale
The issue has not seen recent activity.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.6.0: Wed Jul 5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 Binaries: Node: 18.16.0 npm: 9.5.1 Yarn: N/A pnpm: 8.6.12 Relevant Packages: next: 13.4.14-canary.2 eslint-config-next: 13.4.13 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.6 Next.js Config: output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Routing (next/router, next/navigation, next/link)
Link to the code that reproduces this issue or a replay of the bug
https://github.com/ryanto/next-13-suspense-transition
To Reproduce
The reproduction app contains a
/route1
page that renders a server component in a suspense boundary. When visiting/route1
directly, the suspense boundary is not shown. However, when transitioning to/route1
(using<Link>
), the suspense boundary gets rendered.Describe the Bug
It seems that a non-suspending component can trigger a suspense boundary during a transition, but not an initial render.
This behavior surprised me because I thought the boundary should not be shown when transitioning, but I might be misunderstanding something.
Also, the same behavior happens when awaiting an already resolved promise (suspend boundary is not shown on the initial render, but shown for a transition).
Expected Behavior
I'm not sure- but I was expecting the suspense boundaries to not be shown.
Which browser are you using? (if relevant)
Version 1.56.20 Chromium: 115.0.5790.171 (Official Build) (arm64)
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: