async-actions

tiny redux action names helper

Usage

Create a FOO async action.

import asynActions from 'async-actions'

const FOO = asynActions('FOO')

Then in your reducer

function myReducer (state, action) {
  switch (action.type) {
    case FOO.FAILURE:
      // Handle errors.

    case FOO.REQUEST:
      // Start request.

    case FOO.SUCCESS:
      // Handle response.
  }
}

License

MIT