UNPKG

@nlabs/arkhamjs-example-flow-react

Version:

ArkhamJS React Flow Example App

17 lines (14 loc) 388 B
import {AppConstants} from '../../constants/AppConstants'; export const initialState: AppState = { content: 'Hello World' }; export const app = (type: string, data: any, state: AppState = initialState): AppState => { switch(type) { case AppConstants.UPDATE_CONTENT: { const {content} = data; return {...state, content}; } default: return state; } };