Skip to content

Instantly share code, notes, and snippets.

@kmikulski kmikulski/post.jsx
Created Jun 7, 2018

Embed
What would you like to do?
the description for this gist
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
You can’t perform that action at this time.