import React from 'react' ; import ReactDOM from 'react-dom' ; import { Provider } from 'react-redux' ; import { createBrowserHistory } from 'history' ; import { ConnectedRouter } from 'connected-react-router' ; import './index.css' ; import App from './App' ; import * as serviceWorker from './serviceWorker' ; import createStore from './store/createStore' ; const initialState = ( window as any ) . ___INITIAL_STATE__ ; const history = createBrowserHistory ( ) ; const store = createStore ( initialState , history ) ; ReactDOM . render ( < Provider store = { store } > < ConnectedRouter history = { history } > < App /> < /ConnectedRouter> < /Provider>, document.getElementById('root')); serviceWorker . unregister ( ) ;