babel-plugin-create-redux-action-type
v0.1.2
Published
create redux action type constants
Downloads
15
Maintainers
Readme
babel-plugin-create-redux-action-type
create redux action type constants
Install
yarn
$ yarn add --dev babel-plugin-create-redux-action-type
npm
$ npm install --save-dev babel-plugin-create-redux-action-type
Example
In:
/* @flow */
type HOGE_TYPE = 'hoge/HOGE_ACTION'
type FUGA_TYPE = 'fuga/FUGA_ACTION'
type Action = { +type: HOGE_TYPE | HUGA_TYPE }
Out:
// @flow
import type { HOGE_TYPE, FUGA_TYPE } from './actionTypes';
export const HOGE: HOGE_TYPE = 'hoge/HOGE_ACTION';
export const FUGA: FUGA_TYPE = 'fuga/FUGA_ACTION';"
Usage
{
"plugins": [
"create-redux-action-type"
]
}
License
MIT © akameco