Files
react/packages/react-devtools-scheduling-profiler/src/index.js
T
E-Liang Tan 2bea3fb0b8 Import React Concurrent Mode Profiler (#19634)
Co-authored-by: Brian Vaughn <bvaughn@fb.com>
Co-authored-by: Kartik Choudhary <kartikc.918@gmail.com>
2020-08-20 14:06:28 -04:00

31 lines
741 B
JavaScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import 'regenerator-runtime/runtime';
import * as React from 'react';
// $FlowFixMe Flow does not yet know about createRoot()
import {unstable_createRoot as createRoot} from 'react-dom';
import nullthrows from 'nullthrows';
import App from './App';
import './index.css';
const container = document.createElement('div');
container.id = 'root';
const body = nullthrows(document.body, 'Expect document.body to exist');
body.appendChild(container);
createRoot(container).render(
<React.StrictMode>
<App />
</React.StrictMode>,
);