Back to Next Js

With cookies-next

examples/with-cookies-next/README.md

16.2.51.2 KB
Original Source

With cookies-next

In this example, we are getting, setting and removing cookies

This package works on client side and server side

  • can be used on the client side, anywhere
  • can be used for server side rendering in getServerSideProps
  • can be used in API handlers

Deploy your own

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

bash
npx create-next-app --example with-cookies-next with-cookies-next-app
bash
yarn create next-app --example with-cookies-next with-cookies-next-app
bash
pnpm create next-app --example with-cookies-next with-cookies-next-app

Deploy it to the cloud with Vercel (Documentation).