Skip to content

articulate/redux-future2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redux-future2

npm version npm downloads Build Status Coverage Status NSP Status

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 up to v11.

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))