SimpleR State
SimpleR State is an ultra-lightweight library that provides the simplest state management for React.
- Minimalist API; no complicated concepts or boilerplate
- Use plain functions to update state (including async)
- 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
- It's tiny, just around 1 KB (minified + gzipped)
Get all these benefits with one dependency install:
npm install simpler-state
Two Easy Steps!
Step 1: Create an entity (shared state) and actions (updater functions)
Step 2: Use the entity in your components with hooks
It's that simple! But the library can do a lot more.