Mix SSG and SSR: How to create a static page in a dynamic layout? #54662
Unanswered
juliuslipp
asked this question in
App Router
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hey guys,
I would love to know how I can create a static page in a dynamic layout. Root layout fetches for example the user, but this automatically makes all sub-routes server-side rendered. Any ideas?
The use-case would be the following:
Have a global navigation bar that shows for example a user-menu, if the user is logged in. This depends on user-info which is send to the server via cookies. If I force the layout to be dynamic and the page to be static, the layout will be dynamic, but won't have access to cookies or headers and therefore doesn't "know" which user to show. Fetching data works totally fine though.
All reactions