-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
31 lines (25 loc) · 881 Bytes
/
main.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
/**
* React Static Boilerplate
* https://github.com/kriasoft/react-static-boilerplate
*
* Copyright © 2015-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import 'babel-polyfill';
import 'whatwg-fetch';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import store from './core/store';
import Homepage from './pages/home';
const container = document.getElementById('container');
ReactDOM.render(<Provider store={store}><Homepage /></Provider>, container);
// Enable Hot Module Replacement (HMR)
if (module.hot) {
module.hot.accept('./routes.json', () => {
routes = require('./routes.json'); // eslint-disable-line global-require
render(history.getCurrentLocation());
});
}