rsnext/examples/with-zustand
Milan K 0e55bb1a4a
examples: with-zustand update to App Router (#58042)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-11-16 21:52:34 -06:00
..
public updated zustand example to 4.3.6, changed out deprecated methods (#46911) 2023-03-13 21:26:08 -07:00
src examples: with-zustand update to App Router (#58042) 2023-11-16 21:52:34 -06: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: with-zustand update to App Router (#58042) 2023-11-16 21:52:34 -06:00
tsconfig.json examples: with-zustand update to App Router (#58042) 2023-11-16 21:52:34 -06:00

Zustand example

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

This is an example on how you can use Zustand that also works 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).