Skip to content

Instantly share code, notes, and snippets.

@itto-ki
Created July 11, 2018 17:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itto-ki/8a2c3c2ffc1b51ae382e9e1a297bc2de to your computer and use it in GitHub Desktop.
Save itto-ki/8a2c3c2ffc1b51ae382e9e1a297bc2de to your computer and use it in GitHub Desktop.
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