Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/leetcode-opensource/ayanami

🍭 A better way to react with state
https://github.com/leetcode-opensource/ayanami

decorators react react-hooks reactive reactive-programming reactivex redux reflect rxjs state-management typescript

Last synced: 7 days ago
JSON representation

🍭 A better way to react with state

Awesome Lists containing this project

README

        

Ayanami



A better way to react with state. Inspired by redux-epics-decorator



GitHub license


PRs Welcome


code style: prettier


npm version


codecov


CircleCI


minzipped size

## Highlights

- No extra configuration, everything is out of the box
- Define state and actions in a **predictable** and **type-safe** way
- Use **[`RxJS`](https://rxjs-dev.firebaseapp.com)** to create side effects and more
- **Debuggable**: Inspect actions and state changes via [`redux-devtools-extension`](https://github.com/zalmoxisus/redux-devtools-extension)

## Installation

##### Using [yarn](https://yarnpkg.com/en/package/ayanami):

```bash
yarn add ayanami @asuka/di reflect-metadata rxjs immer
```

##### Or via [npm](https://www.npmjs.com/package/ayanami):

```bash
npm install ayanami @asuka/di reflect-metadata rxjs immer
```

## Examples

- [Reducer example](https://codesandbox.io/s/py5o3ojo7x)
- [ImmerReducer example](https://codesandbox.io/s/ayanamiimmerreducerexample-r07kk)
- [Effect example](https://codesandbox.io/s/nnko0rxjv4)
- [Scope example](https://codesandbox.io/s/jlz44wrymw)
- [Interact with other Ayanami example](https://codesandbox.io/s/ly5ol8xrqz)
- [SameScope example](https://codesandbox.io/s/k97lqxwvn5)