Created
May 24, 2019 08:04
-
-
Save PierreCavalet/1c51bb839d456c90e653d8d673500a32 to your computer and use it in GitHub Desktop.
App
This file contains hidden or 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
import React from 'react' | |
import { BrowserRouter as Router, Route, Link } from 'react-router-dom' | |
import Home from './Home' | |
import Heavy from './Heavy' | |
function AppRouter() { | |
return ( | |
<Router> | |
<div> | |
<nav> | |
<ul> | |
<li> | |
<Link to="/">Home</Link> | |
</li> | |
<li> | |
<Link to="/heavy/">Heavy</Link> | |
</li> | |
</ul> | |
</nav> | |
<Route path="/" exact component={Home} /> | |
<Route path="/heavy/" component={Heavy} /> | |
</div> | |
</Router> | |
) | |
} | |
export default AppRouter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment