flo-dispatch
Create a dispatch function from middleware, with flo at the top.
Installation
$ npm install flo-dispatch
Usage
import dispatcher from '@flox/dispatch'
import rlog from 'redux-log'
let arr = []
let log = dispatcher(rlog(arr))
log(function * () {
yield 'hello'
yield 'world'
})
arr // => ['hello', 'world']
API
createDispatch(mw)
-
mw
- redux middleware
Returns: a function that dispatches actions to the middleware stack
License
MIT