From 9643826617928fd23722497a308fd8d24d873cd7 Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Wed, 24 Oct 2018 13:57:25 +0300
Subject: React 16.6: react-loadable -> React.lazy
---
vnext/src/index.js | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
(limited to 'vnext/src')
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 = () => (
-
+
+
+
);
ReactDOM.render(, document.getElementById('body'));
--
cgit v1.2.3