This repository has been archived by the owner on Sep 11, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'update-react-router' of https://github.com/netpoetica/r…
…eact-redux-starter-kit into netpoetica-update-react-router
- Loading branch information
Showing
2 changed files
with
3 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import { useRouterHistory } from 'react-router' | ||
import { createHistory } from 'history' | ||
import { browserHistory } from 'react-router' | ||
import makeRoutes from './routes' | ||
import Root from './containers/Root' | ||
import configureStore from './redux/configureStore' | ||
|
||
const historyConfig = { basename: __BASENAME__ } | ||
const history = useRouterHistory(createHistory)(historyConfig) | ||
|
||
const initialState = window.__INITIAL_STATE__ | ||
const store = configureStore({ initialState, history }) | ||
|
||
const routes = makeRoutes(store) | ||
|
||
// Render the React application to the DOM | ||
ReactDOM.render( | ||
<Root history={history} routes={routes} store={store} />, | ||
<Root history={browserHistory} routes={routes} store={store} />, | ||
document.getElementById('root') | ||
) |