0e55bb1a4a
Co-authored-by: Lee Robinson <me@leerob.io> |
||
---|---|---|
.. | ||
public | ||
src | ||
.gitignore | ||
next-env.d.ts | ||
package.json | ||
README.md | ||
tsconfig.json |
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
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).