Skip to content

Instantly share code, notes, and snippets.

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