Skip to content

Instantly share code, notes, and snippets.

@gregberge
Last active June 25, 2017 15:52
Show Gist options
  • Select an option

  • Save gregberge/c3ff8d192e7e18ac2548ad071f981fd2 to your computer and use it in GitHub Desktop.

Select an option

Save gregberge/c3ff8d192e7e18ac2548ad071f981fd2 to your computer and use it in GitHub Desktop.
import React from 'react'
import { BrowserRouter, Route } from 'react-router-dom'
import Home from './Home'
import About from './About'
import Topics from './Topics'
const App = () =>
<BrowserRouter>
<div>
<ul>
<li><Link to="/">Home</Link></li>
<li><Link to="/about">About</Link></li>
<li><Link to="/topics">Topics</Link></li>
</ul>
<hr />
<Route exact path="/" component={Home} />
<Route path="/about" component={About} />
<Route path="/topics" component={Topics} />
</div>
</BrowserRouter>
export default App
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment