next.js
next.js copied to clipboard
Flash of parent "loading.tsx" in parallel routes with dynamic folders
Link to the code that reproduces this issue
https://github.com/mrjasonroy/nextjs-14.1.1-parallel-route-loading-flash
To Reproduce
- Clone Repository
- Navigate Using the lefthand navigation to a non cached page
- Observe flash of blue in the header from the loading.tsx in app/todo/loading.tsx
https://github.com/vercel/next.js/assets/603729/6a846189-3007-46bb-908d-758cdec80b0d
Current vs. Expected behavior
When visiting a dynamic route of todo/[id] only the loading.tsx content from app/todo/[id]/loading.tsx should be shows as content is being loaded, not the flash of loading.tsx content from the parent folder
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.1.0: Mon Oct 9 21:33:00 PDT 2023; root:xnu-10002.41.9~7/RELEASE_ARM64_T6031
Binaries:
Node: 20.9.0
npm: 10.1.0
Yarn: N/A
pnpm: 8.10.5
Relevant Packages:
next: 14.1.1-canary.55 // Latest available version is detected (14.1.1-canary.55).
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: N/A
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
App Router
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
confirmed in dev and start