import { Iterable } from 'immutable' ; import { Action } from 'redux' ; import { FORM_CHANGED } from './form-store' ; import { State } from './state' ; export const defaultFormReducer = < RootState > ( initialState ? ) => { const reducer = ( state = initialState , action ) => { switch ( action . type ) { case FORM_CHANGED : return State . assign ( state , action . payload . path , action . payload . value ) ; default : return state ; } } ; return reducer ; } ;