Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const initialState = {
- email:'',
- password:'',
- status:3
- };
- const AuthReducer = (state = initialState, action) => {
- switch (action.type) {
- case 'changeEmail':
- return { ...state, email:action.payload.email};
- case 'changePassword':
- return { ...state, password:action.payload.password};
- case 'changeStatus':
- return { ...state, status:action.payload.status };
- default:
- return initialState;
- }
- }
- export default AuthReducer;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement