//@flow

import { createStore, compose, applyMiddleware } from "redux";
import { routerMiddleware } from "react-router-redux";
import createHistory from "history/createBrowserHistory";
import reducers from "./data/reducers";

const defaultState = {};

export const history = createHistory();

const enhancers = compose(
  window.devToolsExtension ? window.devToolsExtension() : f => f,
  applyMiddleware(routerMiddleware(history))
);

const store = createStore(reducers, defaultState, enhancers);

export default store;

@@ -217,16 +217,56 @@
 ducers%22;
+%0Aimport cards from %22./data/state/cards%22;
 %0A%0Aconst 
@@ -285,12 +285,18 @@
  = %7B
+ cards 
 %7D;%0A
-%0A
 expo
@@ -328,24 +328,198 @@
 History();%0A%0A
+const middlewares = %5BrouterMiddleware(history)%5D;%0A%0Aif (process.env.NODE_ENV === %60development%60) %7B%0A  const %7B logger %7D = require(%60redux-logger%60);%0A%0A  middlewares.push(logger);%0A%7D%0A%0A
 const enhanc
@@ -617,23 +617,20 @@
 dleware(
-routerM
+...m
 iddlewar
@@ -630,25 +630,17 @@
 ddleware
-(history)
+s
 )%0A);%0A%0Aco
@@ -719,11 +719,282 @@
 ult 
-store;
+function configureStore() %7B%0A  const store = createStore(reducers, defaultState, enhancers);%0A%0A  if (module.hot) %7B%0A    module.hot.accept(reducers, () =%3E %7B%0A      const nextRootReducer = require(%22./data/reducers%22).default;%0A      store.replaceReducer(nextRootReducer);%0A    %7D);%0A  %7D%0A%7D
 %0A

Add redux logger and hot reloading to store