Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriyyakym authored Dec 28, 2023
1 parent 35adb17 commit ced7485
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,39 @@
<p>| <a href="https://awai.js.org">Documentation</a> | <a href="https://awai.js.org/examples">Examples</a> | <a href="https://www.npmjs.com/package/awai">NPM</a> | <a href="https://github.com/yuriyyakym/awai-react">Awai-React</a> |</p>
</div>

---

## About

This library suggests an [architectural approach](https://awai.js.org/architecture), where every event is a promise-like (thennable) [AwaiEvent](https://awai.js.org/awai-event) with no terminal state.

AwaiEvent is a fundamental part of this library. It can re-resolve infinite amount of times, and if you await it in a loop, you have an event listener replacement.

Awai provides variety of nodes which were design to help with handling complex logics.
Every Awai node has its events, which can be mixed into any async logics, or used as trigger for [Scenarios](https://awai.js.org/scenario).
This library introduces a fresh approach to state management, where every event is a thennable (promise-like) with no terminal state.

[Scenario](/scenario) is a powerful helper which helps to describe complex logics and events sequences using async functions.

Awai helps with organizing asynchronous logics and handling race conditions with ease, and its main goal is to completely extract business logics from UI layer.
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
```

## Available tools

- **State** - simple node which stores data
- **AsyncState** - helps with storing data loaded asynchronously protecting against race conditions
- **Selector** - combines multiple states (States/AsyncStates/Selectors) into a single value. Handles async loading and protects against race conditions
- **Scenario** - kind of event composable event listener, which allows to declaratively write logic in a saga-like way using async functions
- **Action** - function wrapper which emits events, and is helpful for triggering scenarios
- **FamilyState** - aggregator of multiple states of the same type; handles both sync and async states
- **Effect** - runs callback on dependency states change and cleans up previous effects

## Documentation

- [Quick start](https://awai.js.org/quick-start)
- [Motivation](https://awai.js.org/motivation)
- [Architecture](https://awai.js.org/architecture)
- [Examples](https://awai.js.org/examples)
- Awai nodes: [State](https://awai.js.org/state), [AsyncState](https://awai.js.org/async-state), [Selector](https://awai.js.org/selector), [Action](https://awai.js.org/action), [Scenario](https://awai.js.org/scenario), [FamilyState](https://awai.js.org/family-state), [Effect](https://awai.js.org/effect)
- Tools: [State](https://awai.js.org/state), [AsyncState](https://awai.js.org/async-state), [Selector](https://awai.js.org/selector), [Action](https://awai.js.org/action), [Scenario](https://awai.js.org/scenario), [FamilyState](https://awai.js.org/family-state), [Effect](https://awai.js.org/effect)
- 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), [Repository](https://github.com/yuriyyakym/awai-react)
- **React** - [NPM](https://www.npmjs.com/package/awai-react), [GitHub](https://github.com/yuriyyakym/awai-react)

0 comments on commit ced7485

Please sign in to comment.