From 1be35047cfb56ad5a529a9b381d4719085db5695 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 5 Oct 2018 11:18:57 +0900 Subject: [PATCH] ing --- src/commons/store/index.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/commons/store/index.ts b/src/commons/store/index.ts index a94884d..b6333cd 100644 --- a/src/commons/store/index.ts +++ b/src/commons/store/index.ts @@ -3,8 +3,6 @@ import { Type } from '@angular/core'; import { ActionReducer, ActionReducerMap, - createFeatureSelector, - createSelector, MetaReducer } from '@ngrx/store'; @@ -24,10 +22,14 @@ export const reducers: ActionReducerMap = { // console.log all actions export function logger(reducer: ActionReducer): ActionReducer { return function (state: State, action: any): State { - console.log('state', state); + const result = reducer(state, action); + console.groupCollapsed(action.type); + console.log('prev state', state); console.log('action', action); + console.log('next state', result); + console.groupEnd(); - return reducer(state, action); + return result; }; }