Skip to content

Instantly share code, notes, and snippets.

@cacheflow
Created October 19, 2015 19:18
Show Gist options
  • Save cacheflow/2ede085d04881c0926b5 to your computer and use it in GitHub Desktop.
Save cacheflow/2ede085d04881c0926b5 to your computer and use it in GitHub Desktop.
var reducer_3 = function (action, state = {}) {
console.log('reducer_3 was called with state', state, 'and action', action);
switch (action.type) {
case 'SAY_SOMETHING':
return {
...state,
message: action.value
}
default:
return state;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment