dm-web-react
Version:
The DM web client with React.
15 lines • 542 B
JavaScript
var _a;
import { fromJS } from "immutable";
import { LOCATION_CHANGE } from "./actionTypes";
var initialState = fromJS({
location: "",
});
var ACTION_HANDLERS = (_a = {},
_a[LOCATION_CHANGE] = function (state, action) { return state.update("location", action.payload); },
_a);
export default function reducer(state, action) {
if (state === void 0) { state = initialState; }
var handler = ACTION_HANDLERS[action.type];
return handler ? handler(state, action) : state;
}
//# sourceMappingURL=reducer.js.map