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; }; }