1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-01 07:30:07 +02:00

Refactor perflogger code

This commit is contained in:
JUDIT GRESKOVITS 2017-04-06 12:57:19 +01:00
parent 4f1ca25ce9
commit 587889e4b0

View File

@ -10,17 +10,23 @@ import { isProduction } from '@utils';
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const middleware = isProduction() ?
applyMiddleware(
createLogger(),
promiseMiddleware(),
thunk
) :
applyMiddleware(
createLogger(),
promiseMiddleware(),
thunk,
perflogger
);
export default (state = Object.freeze({})) => {
return createStore(
enableBatching(createReducer()),
state,
composeEnhancers(
applyMiddleware(
createLogger(),
promiseMiddleware(),
thunk/*,
!isProduction() && perflogger*/
)
)
composeEnhancers(middleware)
);
};