Last active
January 29, 2020 22:24
-
-
Save r1ckhenry/edb9dfb9ad4fcc801e4bd0bd42c36ab4 to your computer and use it in GitHub Desktop.
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
import React from "react"; | |
import { BrowserRouter as Router, Route, Switch, Link } from "react-router-dom"; | |
import Countries from "./Countries"; | |
import Languages from "./Languages"; | |
const App = () => { | |
return ( | |
<div className="App"> | |
<Router> | |
<nav> | |
<ul> | |
<li> | |
<Link to="/">All Countries</Link> | |
</li> | |
<li> | |
<Link to="/language/en">English Speaking Countries</Link> | |
</li> | |
</ul> | |
</nav> | |
<div> | |
<Switch> | |
<Route path="/language/en"> | |
<Languages /> | |
</Route> | |
<Route path="/"> | |
<Countries /> | |
</Route> | |
</Switch> | |
</div> | |
</Router> | |
</div> | |
); | |
}; | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment