- Minimalist API; no complicated concepts or boilerplate
- Use plain functions (including async) to update state
- Largely unopinionated with flexible syntax
- Extremely simple to unit test state logic
- Highly extensible with plug-ins (e.g. persistence, dev tools)
- Full TypeScript support with uncomplicated types
- Made specifically for React, and built on React Hooks
- Multiple times faster than context/reducer solution
- Tiny, just around 1 KB (minified + gzipped)
Browse this documentation to explore SimpleR State.
Contents
Quick Start: TL;DR Cheat Sheet 👈
- Binding only relevant values (partial or computed)
- Async actions
- Prefetching data using async initial value
- Persisting entity values
- Separating "pure" updates from actions
- Orchestrating updates to multiple entities with one action
- Simplifying nested object updates with proxies
- Unit testing entities
- Resetting all entities between component tests
- Extending functionality with plug-ins
If you like this library, the concept, and its simplicity, please give it a star on the GitHub repo to let me know. 😀