Created
June 7, 2018 17:41
-
-
Save kmikulski/0ff66dbe40cfdadf9a6d54198869aa9a to your computer and use it in GitHub Desktop.
the description for this gist
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, { Component } from 'react'; | |
import { BrowserRouter, Route, Link } from 'react-router-dom'; | |
import Welcome from './Welcome'; | |
import Secured from './Secured'; | |
import './App.css'; | |
class App extends Component { | |
render() { | |
return ( | |
<BrowserRouter> | |
<div className="container"> | |
<ul> | |
<li><Link to="/">public component</Link></li> | |
<li><Link to="/secured">secured component</Link></li> | |
</ul> | |
<Route exact path="/" component={Welcome} /> | |
<Route path="/secured" component={Secured} /> | |
</div> | |
</BrowserRouter> | |
); | |
} | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment