Fix 500 error (needs to bail out of prerendering at this point because it used cookies)#1850
Fix 500 error (needs to bail out of prerendering at this point because it used cookies)#1850fikrikarim wants to merge 1 commit intosoul/mainfrom
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
| const cookieStore = await cookies(); | ||
| const cartId = cookieStore.get('cartId')?.value ?? null; |
There was a problem hiding this comment.
Note, the reason we did this was to avoid the header from being dynamic for non-logged in users, thus resulting in worse performance. With PPR, we should be able to have just the cart count component be dynamic.
Does this change make every page that uses Header (i.e., all pages) dynamic? Have we checked impact on performance?
There was a problem hiding this comment.
I'd also note that PPR is experimental and "not ready for production use".
|
Marking this as a draft as we investigate the issue further. |
8da67e4 to
857bd7a
Compare
jorgemoya
left a comment
There was a problem hiding this comment.
I think if this is only happening in the Makeswift integration branch, apply the change on that branch until we can figure it out.
|
Cherry-picked and merged to |
|
Love love love @agurtovoy ❤️ |
What/Why?
Fix 500 cookies() error
Testing
Here are the screenshot logs of the integration branch vs the PR branch when I open the /home and /shop-all.
Integration branch:

PR branch:
