Created
May 24, 2019 08:08
-
-
Save PierreCavalet/564f3ecb01965379d2b9482cbbf41eaa to your computer and use it in GitHub Desktop.
App async
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 AsyncHeavy from './AsyncHeavy' | |
function AppRouter() { | |
return ( | |
<Router> | |
<div> | |
<nav> | |
<ul> | |
<li> | |
<Link to="/">Home</Link> | |
</li> | |
<li> | |
<Link to="/heavy/">About</Link> | |
</li> | |
</ul> | |
</nav> | |
<Route path="/" exact component={Home} /> | |
<Route path="/heavy/" component={AsyncHeavy} /> | |
</div> | |
</Router> | |
) | |
} | |
export default AppRouter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment