import { createReducer, on } from '@ngrx/store'; import { initialState } from './state'; import { authSuccess } from './actions'; export const reducer = createReducer( initialState, on(authSuccess, (state, action) => { return { ...state, auth: action.res }; }) );