Description
Awai is a dependency-free state management library for JavaScript and TypeScript. It is built on the idea that every event is a promise-like AwaiEvent with no terminal state, so an event can resolve again and again. If you await an event in a loop, it works as an event listener. The library provides a set of nodes for complex logic, including State, AsyncState, Selector, Action, Scenario, FamilyState, Effect and a Registry. A Scenario is a helper that describes complex logic and sequences of events using ordinary async functions. It is meant for organizing asynchronous logic and handling race conditions. Every node has its own events, which can be mixed into any async logic or used as triggers for a Scenario. The docs say the library's main goal is to move business logic out of the UI layer. You install it from npm under the name awai, and a separate awai-react package provides React integration. The documentation includes a quick start, an architecture section, a todo list example in JavaScript and TypeScript, and a section on the name. The source is on GitHub.…
Highlights
- AwaiEvent
- Scenarios
- State Nodes
- Race-condition handling
- Dependency-free
Ratings & Reviews
No ratings yet
Be the first to rate Awai.
People also visit
Awai FAQ
What is Awai for?
Organizing asynchronous logic and handling race conditions, with the business logic kept out of the UI layer.
How do I install it?
Run npm install awai. A separate awai-react package adds React integration.
What is a Scenario?
A helper for describing complex logic and event sequences with async functions.
Where is the source?
The docs link to public GitHub repositories for awai and awai-react.
What are the best Awai alternatives?
Popular alternatives to Awai include Nucleux, Redux.js and MobX. See all Awai alternatives








