Instantly share code, notes, and snippets.

Embed
What would you like to do?
import React from 'react'
import { ConnectedRouter } from 'connected-react-router'
import { Route, Switch } from 'react-router-dom'
import TopBar from './TopBar'
import ArticleList from '../containers/ArticleList'
import Creator from '../containers/Creator'
const App = ({history}) => (
<div>
<ConnectedRouter history={history}>
<div>
<TopBar />
<Switch>
<Route exact path='/' component={ArticleList} />
<Route path='/new' component={Creator} />
</Switch>
</div>
</ConnectedRouter>
</div>
)
export default App
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment