blob: 0037c2a59d673a67ad572f4deaf67272c62d7421 (
plain) (
blame)
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
|
import React, { lazy, Suspense } from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
import './index.css';
function LoadingView() {
return (
<div id="content">
<div className="lds-ripple"><div></div><div></div></div>
</div>
);
}
const Juick = lazy(() => import('./App'));
const JuickApp = () => (
<React.StrictMode>
<Suspense fallback={LoadingView()}>
<BrowserRouter>
<Juick />
</BrowserRouter>
</Suspense>
</React.StrictMode>
);
ReactDOM.hydrate(<JuickApp />, document.getElementById('app'));
|