Created
September 1, 2020 17:32
-
-
Save manashcse11/9ff4803c133be5285e5fcf6192ea5f89 to your computer and use it in GitHub Desktop.
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 {ADD_USER_DATA} from "../actionTypes"; | |
const initialState = { | |
user: null | |
}; | |
const User = (state = initialState, action) => { | |
switch (action.type) { | |
case ADD_USER_DATA: { | |
const { user } = action.payload; | |
return { | |
...state, | |
user: user | |
}; | |
} | |
default: | |
return state; | |
} | |
} | |
export default User; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment