-
-
Notifications
You must be signed in to change notification settings - Fork 249
/
Copy pathindex.js
37 lines (29 loc) · 782 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
/* eslint-disable */
import SC from 'soundcloud';
import { AppContainer } from 'react-hot-loader';
/* eslint-enable */
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import configureStore from './stores/configureStore';
import App from './components/App';
require('../styles/index.scss');
const store = configureStore();
function render(Component) {
ReactDOM.render(
<AppContainer>
<Provider store={store}>
<Component />
</Provider>
</AppContainer>,
document.getElementById('app'),
);
}
render(App);
if (module.hot) {
module.hot.accept('./components/App', () => {
// eslint-disable-next-line
const NextApp = require('./components/App').default;
render(NextApp);
});
}