0.4.0 • Published 7 years ago

babel-plugin-redux-state-compose v0.4.0

Weekly downloads
6
License
MIT
Repository
github
Last release
7 years ago

babel-plugin-redux-state-compose Build Status

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