@@ -2,46 +2,25 @@ import * as React from 'react';
22import { render } from 'react-dom' ;
33import injectTapEventPlugin from 'react-tap-event-plugin' ;
44
5- import './polyfills' ;
6-
75import { Router , Route , browserHistory , IndexRoute } from 'react-router' ;
8- import { syncHistoryWithStore , routerReducer , routerMiddleware } from 'react-router-redux' ;
6+ import { syncHistoryWithStore } from 'react-router-redux' ;
97
10- import { combineReducers , createStore , applyMiddleware } from 'redux' ;
118import { Provider } from 'react-redux' ;
12- import thunkMiddleware from 'redux-thunk' ;
13- import createLogger from 'redux-logger' ;
149
15- import { reducer as formReducer } from 'redux-form ';
10+ import './polyfills ';
1611
17- import * as reducers from './reducers' ;
1812import { fetchUser } from './actions/user.actions' ;
1913
2014import App from './containers/app/app' ;
2115import Feed from './containers/feed/feed' ;
2216import SettingsPage from './containers/settings.page' ;
2317import AboutPage from './components/about-page' ;
2418
25- injectTapEventPlugin ( ) ;
19+ import configureStore from './configureStore' ;
2620
27- // Apply the middleware to the store
28- const routeMiddleware = routerMiddleware ( browserHistory ) ;
21+ const store = configureStore ( ) ;
2922
30- const middlewares = [ thunkMiddleware , routeMiddleware ] ;
31-
32- if ( process . env . NODE_ENV === 'development' ) {
33- const loggerMiddleware = createLogger ( ) ;
34- middlewares . push ( loggerMiddleware ) ;
35- }
36-
37- const store = createStore (
38- combineReducers ( {
39- ...reducers ,
40- routing : routerReducer ,
41- form : formReducer ,
42- } ) ,
43- applyMiddleware ( ...middlewares )
44- ) ;
23+ injectTapEventPlugin ( ) ;
4524
4625// Create an enhanced history that syncs navigation events with the store
4726const history = syncHistoryWithStore ( browserHistory , store ) ;
0 commit comments