fix runtime issue
This commit is contained in:
Родитель
b01a7ac9de
Коммит
e125e3438c
|
@ -3,9 +3,9 @@ import { useCallback } from 'react';
|
|||
export const sagaReducerLogger = <S, A>(reducer: React.Reducer<S, A>, stateName: string) => useCallback((state, action) => {
|
||||
const next = reducer(state, action);
|
||||
// tslint:disable
|
||||
console.log(`%cPrevious ${stateName}:`, 'color: #9E9E9E; font-weight: 700;', state && state.toJS());
|
||||
console.log(`%cPrevious ${stateName}:`, 'color: #9E9E9E; font-weight: 700;', state && JSON.stringify(state));
|
||||
console.log('%cAction:', 'color: #00A7F7; font-weight: 700;', action);
|
||||
console.log(`%cNext ${stateName}:`, 'color: #47B04B; font-weight: 700;', next && (next as any).toJS());
|
||||
console.log(`%cNext ${stateName}:`, 'color: #47B04B; font-weight: 700;', next && JSON.stringify(next));
|
||||
// tslint:enable
|
||||
return next;
|
||||
}, [reducer]);
|
||||
|
|
Загрузка…
Ссылка в новой задаче