Files
plaidware-wms-web/plop-templates/Page/reducer.js.hbs
2022-03-02 00:41:24 +05:30

16 lines
407 B
Handlebars
Executable File

import Immutable from "immutable"
import {UPDATE_FORM_ERRORS, UPDATE_FORM_VALUES} from "./actions"
const initialState = Immutable.Map()
const reducer = (state = initialState, action) => {
switch (action.type) {
case UPDATE_FORM_ERRORS:
case UPDATE_FORM_VALUES:
return state.mergeDeep(action.payload)
default:
return state
}
}
export default reducer