Created
July 8, 2016 20:51
-
-
Save peterbsmyth/ff3175f7aca2b8595b6cbbfe34fc2249 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const let reducer = (state={}, action) => { | |
switch(action.type) { | |
case RELEVANT_REQUEST: | |
let nextState; | |
if (!state[action.day]) { | |
nextState = Object.assign({}, state, { [action.day]: {} }); | |
} | |
// Do stuff here | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment