Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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
You can’t perform that action at this time.