cookies-next icon indicating copy to clipboard operation
cookies-next copied to clipboard

Setcookie from the server using http only, does not allow getCookie to work correctly on the client side, since document.cookies is not accessible

Open Zakariaels opened this issue 9 months ago • 1 comments

What could be better is to have a server action or a router handler that update the cookie, and then revalidate all data with revalidatePath('/', 'layout')., then in the layout, fetch the cookie and pass it to a client side component that uses context to make it available to all nested client components.

Zakariaels avatar May 13 '24 23:05 Zakariaels