Skip to content

Instantly share code, notes, and snippets.

@carlosble
Created April 3, 2017 21:26
Show Gist options
  • Save carlosble/3e54676e002623b4d8fb80b083e6d1f5 to your computer and use it in GitHub Desktop.
Save carlosble/3e54676e002623b4d8fb80b083e6d1f5 to your computer and use it in GitHub Desktop.
Reducer
import * as actionTypes from '../constants/actionTypes';
import initialState from './initialState';
export default function profileReducer(profile = initialState.profile, action) {
if (action.type == actionTypes.GET_PROFILE) {
return Object.assign({}, profile, action.profile);
}
return profile;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment