Cookies in Next 14
I'm fairly new to SSR and server components.
I am having trouble understanding cookies behavior with ssr and client in mind.
My goal: Set cookie on NextJS backend, be able to see it in browser and in client components.
My code:
This is my route.ts file.
This is my server component.
I know I said my goal was to read my cookie in browser but as first step I wanted to read it in my server component.
When I print myCookies on my POST route, I can see the cookie, but on the get request or on the component I get an empty array.
0 Replies