UNPKG

dm-web-react

Version:

The DM web client with React.

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