Template.tsx not rendering correctly in many different circumstances #56499
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.
Link to the code that reproduces this issue
https://github.com/cjonesdoordash/nextjs-prefetch-issue/tree/template-issue
To Reproduce
With next/link pre-fetching disabled (default when you pull down the branch)
yarn build && yarn start
With next/link pre-fetching enabled (just remove the
prefetch={false}
on both links)yarn build && yarn start
Current vs. Expected behavior
Expected behavior is that Templates re-mount and render in their entirety (both server and client components) on any route transition if they are within the segment.
Current behavior is that Templates fail to mount / render properly in a bunch of difference scenarios listed about in the reproductions.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 22.6.0: Fri Sep 15 13:39:52 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_X86_64 Binaries: Node: 16.18.0 npm: 8.19.2 Yarn: 1.22.5 pnpm: 6.23.6 Relevant Packages: next: 13.5.4 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
App Router, Routing (next/router, next/navigation, next/link)
Additional context
No response
The text was updated successfully, but these errors were encountered: