babel-plugin-s2s-action-types
generate action types
Install
$ npm install --save-dev babel-plugin-s2s-action-types
Usage
In:
Out:
// @flowconst INCREMENT: 'app/counter/INCREMENT' = 'app/counter/INCREMENT' const Actions = INCREMENT
Request/Success/Failure pattern
In:
Out:
const FETCH_REQUEST: 'app/counter/FETCH_REQUEST' = 'app/counter/FETCH_REQUEST'const FETCH_SUCCESS: 'app/counter/FETCH_SUCCESS' = 'app/counter/FETCH_SUCCESS'const FETCH_FAILURE: 'app/counter/FETCH_FAILURE' = 'app/counter/FETCH_FAILURE' const Actions = FETCH_REQUEST FETCH_SUCCESS FETCH_FAILURE