Launched February 6, 2024
Awai

Awai

State management rethinked

FreeOpen SourceCode5,877 impressions#12 of its week

Library helps with organizing asynchronous logic and handling race conditions with ease. Its main goal is to completely extract business logics from UI layer.

Awai is a dependency-free state-management library that organizes asynchronous logic and handles race conditions by using promise-like events.

for
Frontend developers building complex async UI logic
pricing
open source
license
MIT
yuriyyakym/awai 28 1TypeScriptupdated 9 months ago
works withReact

Key features

5 features of Awai
  • AwaiEvent — Promise-like events that can be awaited repeatedly, replacing traditional event listeners.
  • Scenarios — Helper to describe complex event sequences using async functions.
  • State Nodes — Define reactive state with `state` and update it via `action` functions.
  • Race-condition handling — Built-in mechanisms to manage concurrent async operations safely.
  • Dependency-free — Works without external libraries, keeping bundle size minimal.

Use cases

  • Manage todo list state with async actions
  • Coordinate multiple API calls without race conditions
  • Implement complex UI workflows that depend on sequential async events

Awai vs alternatives

AwaiAutomockFluent CINode File RouterSaas UI
Best forPromise-based async state handlingSimpler unit testing for TypeScriptTypeScript-based CI/CD pipelinesFile-based routing for Node.jsReact UI components for startups
PricingOpen sourceFreeFreeFreeFree
DevHunt upvotes314815812354
LaunchedFeb 2024Jan 2023Jan 2024Jan 2023Jan 2023

Awai FAQ

Do I need to use AwaiEvent directly in my code?+

Typically you use higher-level constructs like `state` and `action`; AwaiEvent is shown for illustration.

Is Awai compatible with TypeScript?+

Yes, the library provides TypeScript typings and examples.

How do I install Awai?+

Run `npm install awai` and import the needed functions.

Can Awai be used outside of React?+

Yes, it is framework-agnostic; React integration is optional.

Summarized by DevHunt from awai.js.org · Sep 28, 2026. Details may change; check the official site.