Created
February 17, 2018 15:36
-
-
Save DZuz14/055244beffa2555e9134d751637001ff to your computer and use it in GitHub Desktop.
Reducer
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
function loggedIn(state = false, action) { | |
switch(action.type) { | |
case "login": | |
return true; | |
default: | |
return state; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment