mirror of
https://github.com/Telecominfraproject/wlan-cloud-ui.git
synced 2025-11-02 19:57:58 +00:00
31 lines
791 B
JavaScript
31 lines
791 B
JavaScript
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
import { Provider } from 'react-redux';
|
|
import { ConnectedRouter } from 'connected-react-router';
|
|
|
|
import App from 'containers/App';
|
|
import configureStore from 'store';
|
|
import history from 'utils/history';
|
|
|
|
// Create redux store with history
|
|
const initialState = {};
|
|
const store = configureStore(initialState, history);
|
|
const MOUNT_NODE = document.getElementById('root');
|
|
|
|
const render = () => {
|
|
ReactDOM.render(
|
|
<Provider store={store}>
|
|
<ConnectedRouter history={history}>
|
|
<App />
|
|
</ConnectedRouter>
|
|
</Provider>,
|
|
MOUNT_NODE
|
|
);
|
|
};
|
|
|
|
if (process.env.NODE_ENV !== 'production' && module.hot) {
|
|
module.hot.accept('containers/App', () => ReactDOM.unmountComponentAtNode(MOUNT_NODE));
|
|
}
|
|
|
|
render();
|