# redux-thunk-addon

> Simplify use of thunk minimizing boilerplate coding

Latest version **1.0.4** (published 2019-06-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install redux-thunk-addon
pnpm add redux-thunk-addon
yarn add redux-thunk-addon
bun add redux-thunk-addon
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2019-06-18 |
| First published | 2019-06-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | maxbax |
| Maintainers | maxbax |
| Keywords | redux, thunk, boilerplate |

## Links

- npm: https://www.npmjs.com/package/redux-thunk-addon
- Repository: https://github.com/maxbax/redux-thunk-addon
- Homepage: https://github.com/maxbax/redux-thunk-addon#readme
- Issues: https://github.com/maxbax/redux-thunk-addon/issues
- npm.io page: https://npm.io/package/redux-thunk-addon

## Dependencies (1)

- [redux](https://npm.io/package/redux.md) ^4.0.1

## Recent versions

- 1.0.4 (latest) — 2019-06-18
- 1.0.3 — 2019-06-18
- 1.0.2 — 2019-06-18
- 1.0.1 — 2019-06-18
- 1.0.0 — 2019-06-18
- 0.0.1 — 2019-06-18

## README

# redux-thunk-addon

This library simplify the use of [redux-thunk](https://github.com/reduxjs/redux-thunk) minimizing the boilerplate coding.

## Installation

`npm install --save redux-thunk-addon`

## Usage

You can use this addon into a project with [redux](https://github.com/reduxjs/redux) and [redux-thunk](https://github.com/reduxjs/redux-thunk) configured inside.

In this project you can do the following steps:

1. Create your redux actions using `asyncCallAction` function:

```
    asyncCallAction(
       <action string>,
       <promise function used for api call>,
       <arguments passing to api call>,
    );

```
Inside the actions file export an object with the actions string.

2. Insert new addon reducers into reducers collection:

```
    api: apiReducer(<array of actions string object>),
```

3. Where you have to calll the api, you can use redux to dispatch the actions created before and you can find the status in the corrisponding reducers (`state.api[<action name>]`). 

## Example

In the `Example` folder you can find a small redux example with this library.

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