Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-thunks

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-thunks - npm Package Compare versions

Comparing version 0.3.1 to 1.0.0

5

package.json
{
"name": "redux-thunks",
"version": "0.3.1",
"version": "1.0.0",
"description": "Thunk creator for redux",

@@ -44,2 +44,5 @@ "main": "cjs/index.js",

"dependencies": {},
"peerDependencies": {
"redux-thunk": "^2.2.0"
},
"devDependencies": {

@@ -46,0 +49,0 @@ "ava": "^0.21.0",

26

README.md
# redux-thunks
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/w33ble/redux-thunks/master/LICENSE)
[![Build Status](https://travis-ci.org/w33ble/redux-thunks.svg?branch=master)](https://travis-ci.org/w33ble/redux-thunks)
[![Build Status](https://img.shields.io/travis/w33ble/redux-thunks.svg?branch=master)](https://travis-ci.org/w33ble/redux-thunks)
[![Coverage](https://img.shields.io/codecov/c/github/w33ble/redux-thunks.svg)](https://codecov.io/gh/w33ble/redux-thunks)
[![npm](https://img.shields.io/npm/v/redux-thunks.svg)](https://www.npmjs.com/package/redux-thunks)
![Project Status](https://img.shields.io/badge/status-experimental-orange.svg)
![Project Status](https://img.shields.io/badge/status-stable-brightgreen.svg)
Simple thunk creator for redux.
This is meant to smooth over the use of [redux-thunk](https://github.com/gaearon/redux-thunk) mixed with the use of [redux-actions](https://github.com/acdlite/redux-actions).
This is meant to smooth over the use of [redux-thunk](https://github.com/gaearon/redux-thunk) and [redux-actions](https://github.com/acdlite/redux-actions).

@@ -16,3 +16,3 @@ ## Installation

```
$ yarn add redux-thunks
$ yarn add redux-thunks redux-thunk
```

@@ -23,3 +23,3 @@

```
$ npm install --save redux-thunks
$ npm install --save redux-thunks redux-thunk
```

@@ -29,4 +29,18 @@

Best used along side `redux-actions`.
This module is simply syntactic sugar for using `redux-thunk` with `redux-actions`. As such, it requires that you use the [redux-thunk](https://www.npmjs.com/package/redux-thunk) middleware.
### Add redux-thunk middleware
```js
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import rootReducer from './reducers/index';
// Note: this API requires redux@>=3.1.0
const store = createStore(
rootReducer,
applyMiddleware(thunk)
);
```
### Action definition

@@ -33,0 +47,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc