Slide 48
Slide 48 text
reducers
export default (state = initialState, action) {
switch (action.type) {
case OPEN_SIDEBAR:
return Object.assign({}, state, {
sidebarOpened: true,
});
case CLOSE_SIDEBAR:
return Object.assign({}, state, {
sidebarOpened: false,
});
default:
return state;
}
}