create-action-types
v2.0.0
Published
create flux ActionTypes less verbose
Downloads
28
Maintainers
Readme
create-action-types
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