Skip to content

Instantly share code, notes, and snippets.

@marshallmurphy
Created May 8, 2020 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marshallmurphy/5413f32d0c3dd63dc47d03ebe78bd032 to your computer and use it in GitHub Desktop.
Save marshallmurphy/5413f32d0c3dd63dc47d03ebe78bd032 to your computer and use it in GitHub Desktop.
// 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