import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { applyMiddleware, combineReducers, compose, createStore } from 'redux';
import { initializeCurrentLocation } from 'redux-little-router';
import logger from 'redux-logger';
import thunk from 'redux-thunk';

import DevTools from 'control_new/components/devtools';
import {
  enhancer as routerEnhancer,
  middleware as routerMiddleware,
  reducer as routerReducer,
  Router,
} from 'control_new/routes';
import applicationState from 'control_new/state';


const reducers = combineReducers({
  app: applicationState,
  router: routerReducer,
});


const store = createStore(reducers, reducers(undefined, { type: 'initial' }), compose(
  applyMiddleware(
    logger,
    routerMiddleware,
    thunk
  ),
  routerEnhancer,
  DEVELOPMENT ? DevTools.instrument() : x => x,
));

const initialLocation = store.getState().router;
if (initialLocation) {
  store.dispatch(initializeCurrentLocation(initialLocation));
}

function Root() {
  return (
    <Provider store={store}>
      <Router />
    </Provider>
  );
}


ReactDOM.render(<Root />, document.querySelector('#main'));

@@ -246,22 +246,32 @@
 %0Aimport 
-l
+%7B createL
 ogger
+ %7D
  from 'r
@@ -767,22 +767,123 @@
 re(%0A    
-logger
+createLogger(%7B%0A      collapsed: true,%0A      diff: true,%0A      duration: true,%0A      timestamp: true,%0A    %7D)
 ,%0A    ro

Configure redux-logger to be a bit prettier.