A tiny atomic state manager for React, Vue, Svelte, and other frameworks with tree-shakable stores.
Nano Stores is a minimal, atomic state manager for JavaScript applications. It provides tiny, tree-shakable stores that work across multiple frameworks like React, Vue, and Svelte, enabling developers to move logic out of components and into reactive stores. It solves the problem of bloated state libraries by offering a lightweight, performant alternative.
Frontend developers building applications with React, Vue, Svelte, or other frameworks who need a lightweight, framework-agnostic state management solution. It's particularly suited for projects where bundle size and performance are critical.
Developers choose Nano Stores for its exceptional size (under 1KB), framework flexibility, and tree-shakable architecture. Its unique selling point is the combination of atomic stores, lazy loading capabilities, and broad framework support without sacrificing performance.
A tiny (286 bytes) state manager for React/RN/Preact/Vue/Svelte with many atomic tree-shakable stores
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Core library is under 1KB (271-802 bytes minified and brotlied) with zero dependencies, as emphasized in the README, making it ideal for performance-sensitive bundles.
Works seamlessly with React, Vue, Svelte, Solid, and others via dedicated integration packages, allowing consistent state management across multi-framework projects.
Uses atomic stores that only include used stores in each code chunk, reducing bundle size through efficient dead code elimination.
Supports mount/disabled modes to conserve resources (e.g., network connections) when stores aren't actively used, a unique feature highlighted in the guide.
Provides good TypeScript support with helpers like StoreValue for type-safe state, encouraging robust development practices.
As a known issue in the README, it requires ESM modules, complicating use in environments like old Next.js without transpilation workarounds.
Core features like persistence, routing, and async operations need separate plugins (e.g., @nanostores/persistent), increasing setup complexity and maintenance.
Lacks native devtools or middleware support compared to rivals like Redux, relying on community extensions that may be less mature or documented.
Requires adopting a store-centric pattern to move logic out of components, which can be a paradigm shift and add boilerplate for simple state needs.