This example shows how you can set and get cookies with Next.js.
Preview the example live on StackBlitz:
Deploy the example using Vercel:
Execute create-next-app
with npm or Yarn to bootstrap the example:
npx create-next-app --example next-cookies next-cookies-app
# or
yarn create next-app --example next-cookies next-cookies-app
Deploy it to the cloud with Vercel (Documentation).