Possible to share same layout across different dynamic paths and access a common param in layout? #69864
Unanswered
cbovis
asked this question in
App Router
Replies: 1 comment
-
Unfortunately, this is one of the limitations of the current Next.js. There are a few options you could try:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have a layout requirement that I don't think NextJS app router can currently fulfill properly.
Take this example of three routes:
We'd like them to use a common layout that has access to the slug param. When navigating between these routes we'd like to maintain state but re-render based on changes to the slug.
It seems like currently this isn't possible. They can be placed in a route group however the layout for that route group doesn't have access to the slug parameter. Specifically we'd like to ensure access to the parameter for SSR.
Am I missing something or is this a current limitation?
Beta Was this translation helpful? Give feedback.
All reactions