# Introduction

![](https://raw.githubusercontent.com/Exelord/ember-await/master/logo.png)

## Introduction

Ember Await delivers a component for declarative promise resolution. Makes it easy to handle every state of the asynchronous process, without assumptions about the shape of your data or the type of request. Use it with fetch, Axios or other data fetching libraries, even GraphQL.

### Rationale

Ember Await works well even in larger applications with multiple or nested data dependencies. It encourages loading data on-demand and in parallel at component level instead of in bulk at the route/page level. It's entirely decoupled from your routes, so it works well in complex applications that have a dynamic routing model or don't use routes at all. It is promise-based, so you can resolve anything you want, not just `fetch` requests.

### Core features

* Works with promises, async/await and the Fetch API
* Expose states components for easier promise states handling
* Provides convenient metadata (`isPending`, `isFulfilled` etc.)
* Provides `cancel` and `reload` actions
* Accepts onResolve, onReject and onCancel callbacks
* Supports non-async data
* Highly inspired by [react-async](https://react-async.com)
* Takes advantage of [ember-concurrency](https://ember-concurrency.com/) to manage promise state (aborting, cancellation, etc.)
* ~~Written in TypeScript, ships with type definitions~~

> #### **Disclaimer**
>
> **Ember Await aims to clone the functionality of** [**React Async**](https://react-async.com) **(a react library for handling async state) and bring the solution to Ember ecosystem. As we try to make is as close as possible, not all of them are ported 1:1 and not all of them make sense in Ember. Please keep that in mind.**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://exelord.gitbook.io/ember-await/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
