redux-promise-middleware-define-constants
v1.1.4
Published
Helper for defining constants
Downloads
11
Maintainers
Readme
redux-promise-middleware-define-constants
Helper for defining constants for use with the redux-promise-middleware package.
Installation
$ npm install --save redux-promise-middleware-define-constants
Usage
const defineRPMConstants = require('redux-promise-middleware-define-constants');
const GET_USERS = defineRPMConstants('GET_USERS');
console.log(GET_USERS.ACTION_TYPE); // GET_USERS
console.log(GET_USERS.PENDING); // GET_USERS_PENDING
console.log(GET_USERS.FULFILLED); // GET_USERS_FULFILLED
console.log(GET_USERS.REJECTED); // GET_USERS_REJECTED
//extra aliases
console.log(GET_USERS.TYPE); // GET_USERS
console.log(GET_USERS.ACTION); // GET_USERS
License
MIT © PC Thomatos