Created
May 8, 2020 21:37
-
-
Save marshallmurphy/5413f32d0c3dd63dc47d03ebe78bd032 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
// reducers/settings.js | |
import { | |
SETTINGS | |
} from '../actions'; | |
const settings = (state = {}, action) => { | |
switch (action.type) { | |
case SETTINGS: | |
let newState = Object.assign([], state, | |
action.payload.data | |
); | |
return newState; | |
default: | |
return state; | |
} | |
} | |
export default settings; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment