redux-future2
v1.0.0
Published
Future middleware for redux
Downloads
1,172
Maintainers
Readme
redux-future2
Future middleware for redux.
Usage
future : Store -> Function -> Action -> a
Redux middleware to dispatch actions that are Futures, also known as Asyncs or Tasks. Popular libraries providing Future implementations include crocks
and Fluture
.
If any action has a property called fork
that is a function, the action is assumed to be a Future.
const { applyMiddleware, combineReducers, createStore } = require('redux')
const future = require('redux-future2')
const reducers = require('../ducks')
const store = createStore(combineReducers(reducers), applyMiddleware(future))