A tiny 350b centralized state container with component bindings for Preact & React.
Unistore is a tiny centralized state container for JavaScript applications, specifically designed to work with Preact and React. It provides a Redux-like API for managing application state with a minimal footprint, solving the problem of state management complexity in lightweight frontend projects.
Frontend developers using Preact or React who need a simple, performant state management solution without the overhead of larger libraries.
Developers choose Unistore for its extremely small size (350b core), familiar Redux-like patterns, and seamless integration with Preact and React, making it ideal for performance-sensitive applications.
🌶 350b / 650b state container with component actions for Preact & React
Core library is only 350 bytes, and with Preact integration it totals around 650 bytes, as stated in the README, making it ideal for performance-focused applications where bundle size is critical.
Uses names and patterns similar to Redux, such as actions and reducers, which eases adoption for developers already experienced with Redux, as highlighted in the README's key features.
Actions can be defined as pure functions and imported anywhere, promoting code reusability and clean separation, as shown in the README examples where actions are shared across components.
Can seamlessly run in a web worker via Stockroom, enabling background state management for improved performance, a feature mentioned in the README as a new addition.
Lacks built-in middleware for async actions; developers must manage asynchronous operations manually using async functions or direct store.setState() calls, as evidenced in the README where async actions require careful state updates.
Integration with Redux devtools requires importing a separate module and environment checks, adding setup overhead compared to Redux's out-of-the-box support, as described in the DEBUG section of the README.
Due to its minimal nature, Unistore has a smaller ecosystem than Redux, meaning fewer plugins and community resources for advanced features, which could require custom solutions.
unistore is an open-source alternative to the following products:
🐻 Bear necessities for state management in React
👻 Primitive and flexible state management for React
The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
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.