babel-plugin-redux-state-compose
v0.4.0
Published
compose redux State type
Downloads
31
Maintainers
Readme
babel-plugin-redux-state-compose
compose redux State type
Install
$ npm install babel-plugin-redux-state-compose
Usage
In
// @flow
import type { State as HogeState } from './Hoge/reducer'
export type State = {
hoge: HogeState,
}
App/reducer.js
// @flow
export type State = { app: string }
export const initialState: State = { app: 'app' }
Out
// @flow
import type { State as AppState } from './App/reducer';
import type { State as HogeState } from './Hoge/reducer';
export type State = {
App: AppState;
Hoge: HogeState;
};
babalrc
{
"plugins": [["redux-store-compose", {input: 'App/reducer.js'}]]
}
License
MIT © akameco