Skip to content

Instantly share code, notes, and snippets.

@rishichawda rishichawda/reducer.js Secret
Last active May 18, 2019

Embed
What would you like to do?
Initial reducer.js file - Managing Application state without Redux
export default (state, action) => {
switch (action.type) {
case 'increment':
return {
...state,
count: state.count + 1,
};
default:
return state;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.