https://github.com/yuriyyakym/awai
Promised state management library with a unique events system, where every event is thennable, which allows to write logic in a saga-like way using async functions
https://github.com/yuriyyakym/awai
atomic effects management race-conditions react state state-management
Last synced: 5 months ago
JSON representation
Promised state management library with a unique events system, where every event is thennable, which allows to write logic in a saga-like way using async functions
- Host: GitHub
- URL: https://github.com/yuriyyakym/awai
- Owner: yuriyyakym
- License: mit
- Created: 2023-05-12T18:08:20.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2026-01-13T22:04:53.000Z (5 months ago)
- Last Synced: 2026-01-14T00:40:24.479Z (5 months ago)
- Topics: atomic, effects, management, race-conditions, react, state, state-management
- Language: TypeScript
- Homepage: https://awai.js.org
- Size: 1.03 MB
- Stars: 27
- Watchers: 1
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## About
This library introduces a fresh approach to state management, where every event is a thennable (promise-like) with no terminal state.
Awai provides variety of tools helping with organizing asynchronous logic, handling race conditions, and prioritizes the extraction of business logic from the UI layer.
## Installation
```sh
npm install awai
```
## Documentation
- [Quick start](https://awai.js.org/quick-start)
- [Architecture](https://awai.js.org/architecture)
- [Examples](https://awai.js.org/examples)
- Tools:
- [State](https://awai.js.org/state) - simple node which stores data
- [AsyncState](https://awai.js.org/async-state) - helps with storing data loaded asynchronously protecting against race conditions
- [Selector](https://awai.js.org/selector) - combines multiple states into a single value. Handles async loading and protects against race conditions
- [Action](https://awai.js.org/action) - function wrapper which emits events; is helpful for controlling scenarios
- [Scenario](https://awai.js.org/scenario) - composable event listener which allows to declaratively write logic in a saga-like way using async functions
- [FamilyState](https://awai.js.org/family-state) - aggregator of multiple states of the same type; handles both sync and async states
- [Effect](https://awai.js.org/effect) - runs callback on dependency states change and cleans up previous effects
- Other
- [AwaiEvent](https://awai.js.org/awai-event)
- [Registry](https://awai.js.org/registry)
- [Motivation](https://awai.js.org/motivation)
## Integrations
- **React** - [NPM](https://www.npmjs.com/package/awai-react), [GitHub](https://github.com/yuriyyakym/awai-react)