Next.js Discord

Discord Forum

How to avoid dynamic rendering with user login?

Unanswered
Gouty oak gall posted this in #help-forum
Open in Discord
Gouty oak gallOP
In my layout.tsx I call getServerSession to make slight changes when users are logged in and when they are not. This causes all pages to be dynamically rendered. What is a common pattern to BOTH have static pages AND be able to render the screen using information from the session?

0 Replies