This repository has been archived on 2018-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
arbor-frontend/src/reducer.js

22 lines
454 B
JavaScript

import {Map} from 'immutable';
import * as CONST from './constants';
const actionMap = {
[CONST.SET_STATE]: (state) => {
}
};
/**
* Reducer function mapping action objects to state transition functions
*
* @param {Map} state
* @param {Object} action
* @return {Map}
*/
export default function reducer(state=Map(), action) {
// Return default state if action is undefined
if ( ! Object.keys(actionMap).includes(action)) {
return state;
}
}