Skip to content

Glossary: Next.js Beyond the Basics

cookies()

A function from next/headers, awaited like headers(), that reads cookies and, in actions and route handlers, sets them. kc-shop uses it for the kc_cart cart cookie.

Where the book teaches it

Related terms

headers()Cookie options (httpOnly, sameSite, secure)maxAge