Functor middleware for redux.
functor : Store -> Function -> Action -> a
Redux middleware to dispatch actions that are functors. This includes the built-in javascript Array
type, along with many other ADT's.
If any action has a property called map
that is a function, the action is assumed to be a functor.
const { applyMiddleware, combineReducers, createStore } = require('redux')
const functor = require('redux-functor')
const reducers = require('../ducks')
const store = createStore(combineReducers(reducers), applyMiddleware(functor))