Created
August 26, 2019 13:14
-
-
Save BetterProgramming/cc063e39127d70154eeab9ec6d4b0f4a 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 SET_CONTACTS = 'SET_CONTACTS'; | |
function contactsReducer(state, action) { | |
switch (action.type) { | |
case SET_CONTACTS: | |
state = action.payload; | |
return state; | |
default: | |
return state | |
} | |
} | |
export { contactsReducer, SET_CONTACTS }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment