Created
April 3, 2017 21:26
-
-
Save carlosble/3e54676e002623b4d8fb80b083e6d1f5 to your computer and use it in GitHub Desktop.
Reducer
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
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