Created
August 31, 2018 17:15
-
-
Save iAmShakil/86153e89cd6cb87b8c973981bb2d550e 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 reducer = ( state = 0, action ) => { | |
switch(action.type){ | |
case "INCREMENT": | |
return state + 1 | |
case "DECREMENT": | |
return state - 1 | |
default: | |
return state | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment