Startup optimizations (#226)

* Startup optimisations

* I hate this file

* Inline main script

* Reverting change to do a fairer perf comparison

* Inlining again. Weeeeee!

* Lockfile
This commit is contained in:
Jason Miller
2018-11-09 11:01:02 -05:00
committed by Jake Archibald
parent 3c757bb2b2
commit 7616d33883
9 changed files with 2117 additions and 16 deletions

View File

@@ -4,10 +4,11 @@ import './style';
import App from './components/App';
// Find the outermost Element in our server-rendered HTML structure.
let root = document.querySelector('#app') || undefined;
let root = document.getElementById('app_root') as Element;
// "attach" the client-side rendering to it, updating the DOM in-place instead of replacing:
root = render(<App />, document.body, root);
root.setAttribute('id', 'app_root');
if (process.env.NODE_ENV !== 'production') {
// Enable support for React DevTools and some helpful console warnings: