rsnext/examples/with-zustand
2024-05-08 21:47:14 +02:00
..
public updated zustand example to 4.3.6, changed out deprecated methods (#46911) 2023-03-13 21:26:08 -07:00
src chore: update prettier to 3.2.5 (#65092) 2024-05-08 21:47:14 +02:00
.gitignore Add .yarn/install-state.gz to .gitignore (#56637) 2023-10-18 16:34:48 +00:00
next-env.d.ts Remove incorrect entries for pnpm debug log (#47241) 2023-03-26 22:26:05 -07:00
package.json update @types/react version in examples (#57259) 2023-10-26 19:52:08 -05:00
README.md examples: improve zustand example (#58696) 2024-01-06 11:07:54 -06:00
tsconfig.json examples: improve zustand example (#58696) 2024-01-06 11:07:54 -06:00

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

Deploy the example using Vercel or preview live with StackBlitz

Deploy with Vercel

How to use

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

npx create-next-app --example with-zustand with-zustand-app
yarn create next-app --example with-zustand with-zustand-app
pnpm create next-app --example with-zustand with-zustand-app

Deploy it to the cloud with Vercel (Documentation).