Last active
July 2, 2018 00:12
-
-
Save lupomontero/5f9d57d18b957747b9e6f84548de2c31 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 reducer = (state = { count: 0 }, action) => { | |
switch (action.type) { | |
case 'INCREMENT': | |
state.count++; | |
break; | |
case 'DECREMENT': | |
state.count--; | |
break; | |
} | |
return state; | |
}; | |
module.exports = reducer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment