MyCrypto/common/index.jsx

32 lines
766 B
React
Raw Normal View History

// Application styles must come first in order, to allow for overrides
import 'assets/styles/etherwallet-master.less';
import React from 'react';
import { render } from 'react-dom';
2017-07-05 16:28:54 -07:00
import { syncHistoryWithStore } from 'react-router-redux';
import { Root } from 'components';
import { Routing, history } from './routing';
2017-07-05 16:28:54 -07:00
import { store } from './store';
2017-04-11 22:04:27 -07:00
const renderRoot = Root => {
let syncedHistory = syncHistoryWithStore(history, store);
render(
<Root
key={Math.random()}
routes={Routing}
history={syncedHistory}
store={store}
/>,
document.getElementById('app')
);
2017-04-11 22:04:27 -07:00
};
renderRoot(Root);
if (module.hot) {
2017-07-03 11:23:44 -07:00
module.hot.accept('reducers/index', () =>
store.replaceReducer(require('reducers/index').default)
);
2017-04-11 22:04:27 -07:00
}