Partial Prerendering
Answered
Pine Bunting posted this in #help-forum
Pine BuntingOP
https://nextjs.org/docs/app/building-your-application/deploying/production-checklist
in "Production Checklist" page, I saw a note which says
So I wrapped my user menu with Suspense in the site header to see if it is true. But didn't work.
my pages that are using that layout element are opting out to Dynamic rendering.
when i put
in a page, it gives this error:
I am using cookies in that user menu, and nowhere else. When i delete that component, the page can be rendered as static. So I'm sure it is the user menu
what am I doing wrong? or is this feature not implemented yet? or did i get it completely wrong?
in "Production Checklist" page, I saw a note which says
Good to know: Partial Prerendering (Experimental) will allow parts of a route to be dynamic without opting the whole route into dynamic rendering.So I wrapped my user menu with Suspense in the site header to see if it is true. But didn't work.
my pages that are using that layout element are opting out to Dynamic rendering.
when i put
export const dynamic = "error";in a page, it gives this error:
Page with `dynamic = "error"` couldn't be rendered statically because it used `cookies`I am using cookies in that user menu, and nowhere else. When i delete that component, the page can be rendered as static. So I'm sure it is the user menu
what am I doing wrong? or is this feature not implemented yet? or did i get it completely wrong?
4 Replies
and you don't need
export const dynamic = "error"; if ppr is enable@Ray do you have ppr: true in `next.config.js`?
Pine BuntingOP
yeah. that was the problem. trying again now
Pine BuntingOP
thank you