create-action-types

2.0.0 • Public • Published

create-action-types

NPM version Build Status Test coverage Dependency Status

create flux ActionTypes less verbose

Install

$ npm install --save create-action-types

Usage

import create from 'create-action-types';
 
export default create([
  'INCREMENT_COUNTER',
  'DECREMENT_COUNTER',
 
  // ..other action types
]);
 
// =>
// {
//   INCREMENT_COUNTER: 'INCREMENT_COUNTER',
//   DECREMENT_COUNTER: 'DECREMENT_COUNTER'
// }

is more clear than:

import keyMirror from 'keymirror';
 
export default keyMirror({
  INCREMENT_COUNTER: null,
  DECREMENT_COUNTER: null,
 
  // ..other action types
});

License

MIT © C.T. Lin

/create-action-types/

    Package Sidebar

    Install

    npm i create-action-types

    Weekly Downloads

    15

    Version

    2.0.0

    License

    MIT

    Last publish

    Collaborators

    • chentsulin