aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/index.js')
-rw-r--r--vnext/src/index.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/vnext/src/index.js b/vnext/src/index.js
index 24fe9352..74e36d84 100644
--- a/vnext/src/index.js
+++ b/vnext/src/index.js
@@ -1,11 +1,14 @@
import React from 'react';
import ReactDOM from 'react-dom';
+import Loadable from 'react-loadable';
-import App from './App';
+const Juick = Loadable({
+ loader: () => import('./App'),
+ loading: () => <div>Loading...</div>
+});
-let container = document.createElement('div');
-ReactDOM.render(<App />, container);
-let body = document.getElementById('content').parentNode;
-body.replaceChild(container.getElementsByTagName('header')[0], body.querySelector('#header'));
-body.replaceChild(container.querySelector('#content'), body.querySelector('#content'));
+const JuickApp = () => (
+ <Juick />
+);
+ReactDOM.render(<JuickApp />, document.getElementById('body'));