Back to Next Js

Zustand example

examples/with-zustand/README.md

16.2.51.1 KB
Original Source

Zustand example

This example shows how to integrate Zustand in Next.js.

This is an example on how you can use Zustand with Next.js.

All Client Components have access to the Zustand store using useStore() returned store.ts file.

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-zustand with-zustand-app
bash
yarn create next-app --example with-zustand with-zustand-app
bash
pnpm create next-app --example with-zustand with-zustand-app

Deploy it to the cloud with Vercel (Documentation).