blob: f4c1f23cc68e6f1c1074f04c5264b6a30d81eb1a [file] [log] [blame]
Larbi Gharibe9af9732021-03-31 15:08:01 +01001import React from 'react';
2import ReactDOM from 'react-dom';
Adrien Béraudfe56ba32021-04-08 00:32:11 -04003import './index.scss';
Larbi Gharibe9af9732021-03-31 15:08:01 +01004import App from './App';
Adrien Béraudc4dd44a2021-04-08 01:05:24 -04005//import * as serviceWorker from './serviceWorker';
Adrien Bérauda2bf6fd2021-04-08 01:06:37 -04006const rootEl = document.getElementById('root');
Larbi Gharibe9af9732021-03-31 15:08:01 +01007
Adrien Bérauda2bf6fd2021-04-08 01:06:37 -04008const render = Component =>
Larbi Gharibe9af9732021-03-31 15:08:01 +01009ReactDOM.render(
10 <React.StrictMode>
Adrien Bérauda2bf6fd2021-04-08 01:06:37 -040011 <Component />
Larbi Gharibe9af9732021-03-31 15:08:01 +010012 </React.StrictMode>,
Adrien Bérauda2bf6fd2021-04-08 01:06:37 -040013 rootEl
Larbi Gharibe9af9732021-03-31 15:08:01 +010014);
15
16// If you want your app to work offline and load faster, you can change
17// unregister() to register() below. Note this comes with some pitfalls.
18// Learn more about service workers: https://bit.ly/CRA-PWA
Adrien Béraudc4dd44a2021-04-08 01:05:24 -040019//serviceWorker.unregister();
Adrien Bérauda2bf6fd2021-04-08 01:06:37 -040020render(App)
21if (module.hot) module.hot.accept('./App', () => {
22 try {
23 render(App)
24 } catch (e) {
25 location.reload()
26 }
27})