# @async-resource/redux

> High-Level Resource Manager for Flux Architecure

Latest version **0.2.1** (published 2019-04-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @async-resource/redux
pnpm add @async-resource/redux
yarn add @async-resource/redux
bun add @async-resource/redux
```

## Health

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

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2019-04-28 |
| First published | 2018-08-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 30.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Cristóvão Trevisan |
| Maintainers | cristovao-trevisan |
| Keywords | resource, manager, redux, http, async |

## Links

- npm: https://www.npmjs.com/package/@async-resource/redux
- npm.io page: https://npm.io/package/@async-resource/redux

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 0.2.1 (latest) — 2019-04-28
- 0.2.0-1 — 2019-04-28
- 0.1.5 — 2019-02-13
- 0.1.4 — 2019-02-10
- 0.1.2 — 2019-02-10
- 0.1.1 — 2018-09-20
- 0.1.0 — 2018-09-20
- 0.0.6 — 2018-08-30
- 0.0.5 — 2018-08-30
- 0.0.4 — 2018-08-30
- 0.0.3 — 2018-08-28
- 0.0.2 — 2018-08-28
- 0.0.1 — 2018-08-28

## README

# @async-resource/redux

## Installation

`npm install --save @async-resource/redux`

## Usage

```js
import connectResource, {
  consumeAction,
  reducers,
  registerResource,
  applyResourceToStore,
} from '@async-resource/redux'

// use it with https://github.com/ioof-holdings/redux-dynamic-reducer
// to add reducers dynamically
export const store = createStore(combineReducers({}))
const { registerResource: registerDynamicResource } = connectResource(store)
registerResource('user', {
  source: () => axios.get('/rest/user-info'),
})


// or use with a constant store
registerResource('user', {
  source: () => axios.get('/rest/user-info'),
})
export const store = createStore(combineReducers(reducers))
applyResourceToStore(store)


// interact with redux
store.dispatch(consumeAction('user'))
```

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