1.2.0 • Published 8 years ago

@flox/dispatch v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

flo-dispatch

Build status Git tag NPM version Code style

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