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: 8 months ago
JSON representation
🍭 A better way to react with state
- Host: GitHub
- URL: https://github.com/leetcode-opensource/ayanami
- Owner: LeetCode-OpenSource
- License: mit
- Created: 2019-03-29T10:42:08.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-16T17:33:06.000Z (over 1 year ago)
- Last Synced: 2025-03-31T12:07:02.538Z (9 months ago)
- Topics: decorators, react, react-hooks, reactive, reactive-programming, reactivex, redux, reflect, rxjs, state-management, typescript
- Language: TypeScript
- Homepage:
- Size: 3.91 MB
- Stars: 137
- Watchers: 7
- Forks: 10
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ayanami
A better way to react with state. Inspired by redux-epics-decorator
## 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)