const rootReducer = (state, action) => { if (action.type === userConstants.LOGOUT) { state = undefined; } return appReducer(state, action); }
function logout() { userService.logout(); return (dispatch) => { dispatch({ type: userConstants.LOGOUT }); }; }
const logout = () => { return { type: AuthActionType.LOGOUT, payload: { promise: api.get('/logout') } } }
const logout = () => { fetch('/logout'); return { type: userConstants.LOGOUT }; }
function auth(state = initialAuthState, action) { switch (action.type) { case navActions.LOGIN: return { ...state, isLoggedIn: false } case navActions.LOGOUT: return { ...state, isLoggedIn: false } default: return state } }
const logout = function() { return { type: types.LOGOUT, meta: { sync: 'user' } }; }
const logoutAction = () => { return dispatch => { localStorage.removeItem(AUTH_TOKEN); dispatch({ type: types.LOGOUT }); }; }
function logout() { loginService.logout(); return { type: loginFormConstants.LOGOUT }; }
export function LogoutReducer(state = {}, action) { switch (action.type) { case userConstants.LOGOUT: return {}; default: return state; } }
function logout() { userService.logout(); return (dispatch) => { dispatch({ type: userConstants.LOGOUT }); }; }
const rootReducer = (state, action) => { if (action.type === userConstants.LOGOUT) { state = undefined; } return appReducer(state, action); }
function logout() { userService.logout(); return { type: userConstants.LOGOUT }; }
function logout() { userService.logout(); return { type: userConstants.LOGOUT }; }
function logout() { userService.logout(); return { type: userConstants.LOGOUT }; }
function logout() { userService.logout(); return { type: userConstants.LOGOUT }; }