Created
August 22, 2019 08:36
-
-
Save DZuz14/74f037e34afa95731fa7c8dc985b85d5 to your computer and use it in GitHub Desktop.
User Profile Reducer
This file contains hidden or 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
const initialState = { | |
submitting: false, | |
success: '', | |
error: '', | |
}; | |
/** | |
* @function userProfile | |
*/ | |
const userProfile = (state = initialState, action) => { | |
switch (action) { | |
case 'SUBMIT_PROFILE_FORM': | |
return { ...state, submitting: true, error: '' }; | |
} | |
return state; | |
}; | |
export default userProfile; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment