Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ctrlplusb/easy-peasy
Vegetarian friendly state for React
https://github.com/ctrlplusb/easy-peasy
hooks immer immutable react react-hooks redux state-management
Last synced: 3 days ago
JSON representation
Vegetarian friendly state for React
- Host: GitHub
- URL: https://github.com/ctrlplusb/easy-peasy
- Owner: ctrlplusb
- License: mit
- Created: 2018-10-21T20:52:18.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-28T19:15:10.000Z (about 1 month ago)
- Last Synced: 2024-10-29T09:09:03.927Z (about 1 month ago)
- Topics: hooks, immer, immutable, react, react-hooks, redux, state-management
- Language: JavaScript
- Homepage: https://easy-peasy.dev
- Size: 9.05 MB
- Stars: 5,029
- Watchers: 34
- Forks: 190
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-react-cn - easy-peasy - Vegetarian friendly state for React (Uncategorized / Uncategorized)
- awesome - easy-peasy - Vegetarian friendly state for React (JavaScript)
- fucking-awesome-react-hooks - `easy-peasy`
- awesome-react - easy-peasy - An abstraction of Redux, providing a reimagined API that focuses on developer experience. ![](https://img.shields.io/github/stars/antonioru/beautiful-react-hooks.svg?style=social&label=Star) (Utilities / State Management)
- awesome-state - easy-peasy
- awesome-github-repos - ctrlplusb/easy-peasy - Vegetarian friendly state for React (JavaScript)
- awesome-learning-resources - easy-peasy - Vegetarian friendly state for React (Uncategorized / Uncategorized)
- awesome-react-hooks-cn - `easy-peasy`
- awesome-list - easy-peasy
- best-of-react - GitHub - 2% open · ⏱️ 19.10.2023): (State Management)
- awesome-react-hooks - `easy-peasy`
- awesome-react-hooks - `easy-peasy`
- awesome-react-state-management - easy-peasy - Vegetarian friendly state for React (List)
- awesome-react - easy-peasy - Vegetarian friendly state for React ` 📝 4 months ago` (React [🔝](#readme))
- awesome-react-hooks - easy-peasy - Vegetarian friendly state for React (Packages)
- awesome-star-libs - ctrlplusb / easy-peasy
README
Vegetarian friendly state for React
[![npm](https://img.shields.io/npm/v/easy-peasy.svg?style=flat-square)](http://npm.im/easy-peasy)
[![MIT License](https://img.shields.io/npm/l/easy-peasy.svg?style=flat-square)](http://opensource.org/licenses/MIT)
[![Codecov](https://img.shields.io/codecov/c/github/ctrlplusb/easy-peasy.svg?style=flat-square)](https://codecov.io/github/ctrlplusb/easy-peasy)Easy Peasy is an abstraction of Redux, providing a reimagined API that focuses on developer experience. It allows you to quickly and easily manage your state, whilst leveraging the strong architectural guarantees and extensive eco-system that Redux has to offer.
- Zero configuration
- No boilerplate
- React hooks based API
- Extensive TypeScript support
- Encapsulate data fetching
- Computed properties
- Reactive actions
- Redux middleware support
- State persistence
- Redux Dev Tools
- Global, context, or local stores
- Built-in testing utils
- React Native supported
- Hot reloading supported
All of this comes via a single dependency install.
```
npm install easy-peasy
```
## Fly like an eagle 🦅
**Create your store**
```javascript
const store = createStore({
todos: ['Create store', 'Wrap application', 'Use store'],
addTodo: action((state, payload) => {
state.todos.push(payload);
}),
});
```
**Wrap your application**
```javascript
function App() {
return (
);
}
```
**Use the store**
```javascript
function TodoList() {
const todos = useStoreState((state) => state.todos);
const addTodo = useStoreActions((actions) => actions.addTodo);
return (
{todos.map((todo, idx) => (
))}
);
}
```
## Examples 📚
See the [example folder](./examples) for more examples of how to use
`easy-peasy`.
## Core Team 🛠
Peter Weinberg
Jørn A. Myrland
Sean Matheson
## Our Sponsors ❤️
We have only but great appreciation to those who support this project. If you
have the ability to help contribute towards the continued maintenance and
evolution of this library then please consider
[[becoming a sponsor](https://opencollective.com/easy-peasy#backer)].
## Documentation
See the [official website](https://easy-peasy.dev) for tutorials, docs, recipes,
and more.
## OS Awards Nominee
Easy Peasy was nominated under the "Productivity Booster" category.