Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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) => (
{todo}

))}


);
}
```

 

## 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.