UNPKG

dm-web-react

Version:

The DM web client with React.

17 lines (11 loc) 431 B
import { Map, fromJS } from "immutable"; export type InitialState = {}; export type InitialStateType = Map<keyof InitialState, any>; const initialState: InitialStateType = fromJS({}); export { initialState }; // action handlers const ACTION_HANDLERS = {}; export default function reducer(state = initialState, action: any) { const handler = ACTION_HANDLERS[action.type]; return handler ? handler(state, action) : state; }