# redux-progress

> Redux model to capture states of asynchronous operations (i.e. promises)

Latest version **1.0.5** (published 2019-03-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install redux-progress
pnpm add redux-progress
yarn add redux-progress
bun add redux-progress
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2019-03-09 |
| First published | 2018-06-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=6.0.0 |
| Dependencies | 1 |
| Unpacked size | 95 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | hluk |
| Maintainers | sheepier |

## Links

- npm: https://www.npmjs.com/package/redux-progress
- Repository: https://github.com/hendryluk/redux-progress
- npm.io page: https://npm.io/package/redux-progress

## Dependencies (1)

- [flow-to-typescript](https://npm.io/package/flow-to-typescript.md) ^1.0.0

## Recent versions

- 1.0.5 (latest) — 2019-03-09
- 1.0.4 — 2019-03-09
- 1.0.3 — 2019-03-09
- 1.0.2 — 2019-02-09
- 1.0.1 — 2019-02-09
- 1.0.0 — 2019-02-09
- 0.0.29 — 2018-10-11
- 0.0.28 — 2018-09-16
- 0.0.27 — 2018-09-07
- 0.0.26 — 2018-09-07
- 0.0.25 — 2018-09-05
- 0.0.24 — 2018-09-05
- 0.0.23 — 2018-09-05
- 0.0.22 — 2018-09-05
- 0.0.21 — 2018-09-05
- … 9 more at https://npm.io/package/redux-progress/versions

## README

#redux-progress
This library helps represent the state of asynchronous data into your application's state.
 
##Install
`yarn add redux-progress`

or

`npm install --save redux-progress`

##Use

In your state definition:

```
import * as Progress from 'redux-progress';

type User = {
  name: string,
}

type State = {
  users: Progress.AsyncData<User[]>,
}
```

In your action:

```
import * as Progress from 'redux-progress';

const FETCH_USERS = 'FETCH_USERS';
const fetchUsers = Progress.thunk(FETCH_USERS, fetch('/users'));
```

In your reducer:
```
import * as Progress from 'redux-progress';

const usersReducer = (state = Progress.none, action) => {
  if(action.type === 'FETCH_USERS')
      return action.progress;
  return state; 
}
```

Use it:

---
_Source: https://npm.io/package/redux-progress · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
