Files
TechRadarAJR/js/reducer.js
2017-03-21 20:57:20 +01:00

25 lines
430 B
JavaScript

import { NAVIGATE } from './actions';
const initialState = {
pageName: 'index',
pageState: {},
items: [],
releases: [],
};
const appReducer = (state = initialState, action = {}) => {
switch (action.type) {
case NAVIGATE:
return {
...state,
pageName: action.pageName,
pageState: action.pageState,
}
break;
default:
return state;
}
}
export default appReducer;