We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e632690 commit 23da742Copy full SHA for 23da742
src/containers/index.js
@@ -1,16 +1,16 @@
1
import React from 'react';
2
// import package
3
-import { Router, Route, hashHistory } from 'react-router';
+import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
4
// import relative path
5
import Home from './Home';
6
import NotFound from './NotFound';
7
8
-// add router key to fix this issue
9
-// https://github.com/reactjs/react-router-redux/issues/179#issuecomment-275576250
10
const Main = () => (
11
- <Router key={Math.random()} history={hashHistory}>
12
- <Route path="/" component={Home} />
13
- <Route path="*" component={NotFound} />
+ <Router>
+ <Switch>
+ <Route exact path="/" component={Home} />
+ <Route component={NotFound} />
+ </Switch>
14
</Router>
15
);
16
0 commit comments