Archiving this repo as npm package with similar name already exists. Please follow React18GlobalStore for the latest updates.
I have built wonderful libraries utilizing React18 features using Zustand. They worked awesome. However, when I try importing from specific folder for better tree-shaking, the libraries fail. This is because, for each import a separate zustand store is created. This actually increases the package size also.
Thus, I decided to create a bare minimum, ultra-light store that creates shared state even while importing components from separate files for better treeshaking.
Will be using this library soon to fix issues with
nextjs-themes
.
✅ Full TypeScript Support
✅ Unleash the full power of React18 Server components
✅ Works with all build systems/tools/frameworks for React18
✅ Doccumented with Typedoc (Docs)
✅ Next.js, Vite and Remix examples
$ pnpm add zen-store
or
$ npm install zen-store
or
$ yarn add zen-store
To build all apps and packages, run the following command:
cd zen-store
pnpm build
To develop all apps and packages, run the following command:
cd zen-store
pnpm dev
Learn more about the power of Turborepo:
🤩 Don't forger to start this repo!
Want hands-on course for getting started with Turborepo? Check out React and Next.js with TypeScript and The Game of Chess with Next.js, React and TypeScrypt
Licensed as MIT open source.
with 💖 by Mayank Kumar Chaudhari