Remove unstable_createRoot from internal builds (#21698)

These callsites were already removed as far as I can tell.
This commit is contained in:
Sebastian Markbåge
2021-06-17 11:29:30 -07:00
committed by GitHub
parent 43f4cc1608
commit 568dc3532e
7 changed files with 5 additions and 8 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
*/
import React from 'react';
import {unstable_createRoot as createRoot} from 'react-dom';
import {createRoot} from 'react-dom';
import './index.css';
import Router from './Router';
@@ -1,5 +1,5 @@
import React, {PureComponent, unstable_startTransition} from 'react';
import {unstable_createRoot} from 'react-dom';
import {createRoot} from 'react-dom';
import _ from 'lodash';
import Charts from './Charts';
import Clock from './Clock';
@@ -142,5 +142,5 @@ class App extends PureComponent {
}
const container = document.getElementById('root');
const root = unstable_createRoot(container);
const root = createRoot(container);
root.render(<App />);
+1 -1
View File
@@ -1,5 +1,5 @@
const {createElement, useLayoutEffect, useState} = React;
const {unstable_createRoot: createRoot} = ReactDOM;
const {createRoot} = ReactDOM;
function App() {
const [isMounted, setIsMounted] = useState(false);
+1 -1
View File
@@ -189,7 +189,7 @@ it("doesn't warn if you use nested acts from different renderers", () => {
if (__EXPERIMENTAL__) {
it('warns when using createRoot() + .render', () => {
const root = ReactDOM.unstable_createRoot(document.createElement('div'));
const root = ReactDOM.createRoot(document.createElement('div'));
expect(() => {
TestRenderer.act(() => {
root.render(<App />);
-1
View File
@@ -22,7 +22,6 @@ export {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
createPortal,
createRoot,
createRoot as unstable_createRoot, // TODO Remove once callsites use createRoot
hydrateRoot,
findDOMNode,
flushSync,
-1
View File
@@ -13,7 +13,6 @@ export {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
createPortal,
createRoot,
createRoot as unstable_createRoot,
hydrateRoot,
findDOMNode,
flushSync,
-1
View File
@@ -11,7 +11,6 @@ export {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
createPortal,
createRoot,
createRoot as unstable_createRoot, // TODO Remove once callsites use createRoot
hydrateRoot,
flushSync,
unstable_batchedUpdates,