redux-promise-middleware-define-constants
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

redux-promise-middleware-define-constants NPM version Build Status Dependency Status Coverage percentage

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

Package Sidebar

Install

npm i redux-promise-middleware-define-constants

Weekly Downloads

2

Version

1.1.4

License

MIT

Unpacked Size

6.53 kB

Total Files

6

Last publish

Collaborators

  • pcthomatos