import { createReducer, on } from '@ngrx/store'; import { initialState } from './state'; import { infoSuccess } from './actions'; import * as AuthenticationStore from '@app/store/account/authentication'; export const reducer = createReducer( initialState, on(infoSuccess, (state, action) => { return { ...state, roomInfo: action.roomInfo, userInfoList: action.userInfoList, userInfoShortList: action.userInfoShortList }; }), on(AuthenticationStore.logout, (state, action) => { return { ...initialState }; }) );