/* @flow */ // constants const INCREMENT = 'increment' const ADD = 'add' export const Actions = { INCREMENT, ADD } // actions export type IncrementAction = { type: typeof Actions.INCREMENT } export type AddAction = { type: typeof Actions.ADD, payload: number } export type CounterAction = IncrementAction | AddAction // reducer type CounterState = { value: number } export default (state: CounterStat