moshest / next-client-cookies

SSR and client support for cookies in Next.js 13 (app directory)
MIT License
136 stars 9 forks source link

Document that CookieProvider bails out the route segment from static generation #16

Closed mordechaim closed 8 months ago

mordechaim commented 8 months ago

I noticed while building my application that the entire app now opted out of static generation. After debugging the problem I concluded the cause to be wrapping the root layout with <CookieProvider>.

In my case, I only needed client cookies on a single page, so wrapping the root was an overkill.

I think it would be beneficial to document this.

moshest commented 8 months ago

Added: https://github.com/moshest/next-client-cookies/commit/de68ab7dd29b7f3b5c89158176963e729a8f9837