-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
28 lines (25 loc) · 860 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { Router, Route, IndexRoute } from 'react-router'
import store, { history } from './store'
import registerServiceWorker from './registerServiceWorker'
import ArtPage from './components/ArtPage'
import injectTapEventPlugin from 'react-tap-event-plugin'
import App from './App'
import AllArticles from './components/AllArticles'
// Needed for onTouchTap
// http://stackoverflow.com/a/34015469/988941
injectTapEventPlugin()
ReactDOM.render(
<Provider store={store}>
<Router history={history}>
<Route path="/" component={App}>
<IndexRoute component={AllArticles} />
<Route path="/articles/:articleId" component={ArtPage} />
</Route>
</Router>
</Provider>,
document.getElementById('root')
)
registerServiceWorker()