forked from recharts/recharts.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
22 lines (19 loc) · 823 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* eslint-disable no-underscore-dangle */
import React from 'react';
import ReactDOM from 'react-dom';
import { applyRouterMiddleware, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import { useScroll } from 'react-router-scroll';
import makeRoutes from './routes';
import Root from './containers/Root';
import configureStore from './redux/configureStore';
const initialState = window.__INITIAL_STATE__;
const store = configureStore(initialState, browserHistory);
const history = syncHistoryWithStore(browserHistory, store, {
selectLocationState: (state) => state.router,
});
const routes = makeRoutes(store);
ReactDOM.render(
<Root history={history} routes={routes} store={store} render={applyRouterMiddleware(useScroll())} />,
document.getElementById('app'),
);