forked from nukeop/nuclear
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
36 lines (30 loc) · 823 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
29
30
31
32
33
34
35
36
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { MemoryRouter } from 'react-router-dom';
import { Provider } from 'react-redux';
import { AppContainer } from 'react-hot-loader';
import App from './App';
import configureStore from './store/configureStore';
const store = configureStore();
// Sentry
process.env.NODE_ENV === 'production' &&
Raven.config('https://2fb5587831994721a8b5f77bf6010679@sentry.io/1256142').install();
const render = Component => {
ReactDOM.render(
<AppContainer>
<Provider store={store}>
<MemoryRouter>
<Component />
</MemoryRouter>
</Provider>
</AppContainer>,
document.getElementById('react_root')
);
};
render(App);
if (module.hot) {
module.hot.accept( () => {
render(App);
});
}