aboutsummaryrefslogtreecommitdiff
path: root/vnext/src
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src')
-rw-r--r--vnext/src/index.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/vnext/src/index.js b/vnext/src/index.js
index 1180d303..b64d2336 100644
--- a/vnext/src/index.js
+++ b/vnext/src/index.js
@@ -1,6 +1,5 @@
-import React from 'react';
+import React, { lazy, Suspense } from 'react';
import ReactDOM from 'react-dom';
-import Loadable from 'react-loadable';
function LoadingView(props) {
return (
@@ -23,13 +22,12 @@ function LoadingView(props) {
);
}
-const Juick = Loadable({
- loader: () => import('./App'),
- loading: LoadingView
-});
+const Juick = lazy(() => import('./App'));
const JuickApp = () => (
- <Juick />
+ <Suspense fallback={LoadingView}>
+ <Juick />
+ </Suspense>
);
ReactDOM.render(<JuickApp />, document.getElementById('body'));