More on routing

This commit is contained in:
Tom Raithel
2017-02-20 22:51:30 +01:00
parent 00b31d8414
commit 517df35b94
9 changed files with 70 additions and 18 deletions

22
js/reducer.js Normal file
View File

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