Files
react/packages/react-devtools-scheduling-profiler/src/index.js
Brian Vaughn 2bf4805e4b Update entry point exports (#21488)
The following APIs have been added to the `react` stable entry point:
* `SuspenseList`
* `startTransition`
* `unstable_createMutableSource`
* `unstable_useMutableSource`
* `useDeferredValue`
* `useTransition`

The following APIs have been added or removed from the `react-dom` stable entry point:
* `createRoot`
* `unstable_createPortal` (removed)

The following APIs have been added to the `react-is` stable entry point:
* `SuspenseList`
* `isSuspenseList`

The following feature flags have been changed from experimental to true:
* `enableLazyElements`
* `enableSelectiveHydration`
* `enableSuspenseServerRenderer`
2021-05-12 11:28:14 -04:00

32 lines
770 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 {createRoot} from 'react-dom';
import nullthrows from 'nullthrows';
import App from './App';
import styles from './index.css';
const container = document.createElement('div');
container.className = styles.Container;
container.id = 'root';
const body = nullthrows(document.body, 'Expect document.body to exist');
body.appendChild(container);
createRoot(container).render(
<React.StrictMode>
<App />
</React.StrictMode>,
);