-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
31 lines (26 loc) · 896 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
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App.js';
import registerServiceWorker from './registerServiceWorker';
import { Provider as ReduxProvider } from 'react-redux';
import { Provider as ContextProvider } from './context.js';
import { configureStore } from './redux/store.js';
import { Route, BrowserRouter } from 'react-router-dom';
const store = configureStore();
const render = () => (ReactDOM.render((
<ReduxProvider store={store}>
<ContextProvider>
<BrowserRouter>
<React.Fragment>
<Route path="/" component={App} />
</React.Fragment>
</BrowserRouter>
</ContextProvider>
</ReduxProvider>
), document.getElementById('root')));
if ((process.env.NODE_ENV !== 'production') && module.hot) {
module.hot.accept('./App.js', () => render());
}
render();
registerServiceWorker();