redux-handle-actions

January 19, 2016 ยท View on GitHub

Build status Git tag NPM version Code style

Redux middleware for handling actions.

Installation

$ npm install redux-handle-actions

Usage

import HandleActions from 'redux-handle-actions'
import bind from '@f/bind-middleware'

let io = bind([HandleActions(add)])
io(0) // => 1

function add (action) {
  return action + 1
}

API

reduxHandleActions(handler)

  • handler - action handler with signature handler(action)

Returns: redux middleware

License

MIT