Skip to content

Commit 30ca7fb

Browse files
committed
fix bugs
1 parent b824f55 commit 30ca7fb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/index.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React from 'react'
22
import { render } from 'react-dom'
33
import { Provider } from 'react-redux'
4-
import { Route } from 'react-router'
5-
import { ConnectedRouter } from 'react-router-redux'
6-
import store, { history } from './store'
4+
import { Router, Route } from 'react-router'
5+
import createHistory from 'history/createBrowserHistory'
6+
import store from './store'
77
import App from './containers/app'
88
import Home from './containers/home'
99
import About from './containers/about'
@@ -12,15 +12,16 @@ import 'sanitize.css/sanitize.css'
1212
import './index.css'
1313

1414
const target = document.querySelector('#root')
15+
const history = createHistory()
1516

1617
render(
1718
<Provider store={store}>
18-
<ConnectedRouter history={history}>
19+
<Router history={history}>
1920
<App>
2021
<Route exact path="/" component={Home} />
2122
<Route exact path="/about-us" component={About} />
2223
</App>
23-
</ConnectedRouter>
24+
</Router>
2425
</Provider>,
2526
target
2627
)

0 commit comments

Comments
 (0)