How to get the client's cookie and use it in generateMetadata?
Open in Discord
Transvaal lion posted this in #help-forum
To access cookies inside the
generateMetadata function use the
cookies function exported from
next/headers. Keep in mind that this will opt your page out of static rendering and render it dynamically on request, which means you'll see slower load times for that page.