Open M7ilan opened 11 months ago
In generel Parrallel routes is just buggy. Fx. this error on v. 14.0.4 makes no sense. This should just work and did in v. 14.0.1. It's even worse in canary version. Last issue about this was closed because no one picked up the error in the Next team
Just tested this on v14.2.15
and v15.0.0-canary.181
and still encountering the same issue. I'm not sure if it's supposed to work the way I expect, which is to only rerender the modified parallel routes or components while leaving everything else unchanged.
Link to the code that reproduces this issue
https://github.com/M7ilan/nesting-layout-inside-optional-catch-all-segment-uses-parallel-route-reset-on-navigation
To Reproduce
Open https://issue-60037.vercel.app/ or clone the repo above.
That mean the whole layout re-rendered/reset which is a problem.
Current vs. Expected behavior
Currently the
app\route\[[...slug]]\layout.tsx
is re-rendering/reset on every navigation which also re-renders all the parallel routes inside it.I expect the
app\route\[[...slug]]\layout.tsx
to re-renders the changed parallel-routes/components not everything.Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
App Router, Routing (next/router, next/navigation, next/link)
Additional context
No response