mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Remove unstable_createRoot from internal builds (#21698)
These callsites were already removed as far as I can tell.
This commit is contained in:
@@ -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,5 +1,5 @@
|
||||
const {createElement, useLayoutEffect, useState} = React;
|
||||
const {unstable_createRoot: createRoot} = ReactDOM;
|
||||
const {createRoot} = ReactDOM;
|
||||
|
||||
function App() {
|
||||
const [isMounted, setIsMounted] = useState(false);
|
||||
|
||||
@@ -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 />);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Vendored
-1
@@ -13,7 +13,6 @@ export {
|
||||
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
||||
createPortal,
|
||||
createRoot,
|
||||
createRoot as unstable_createRoot,
|
||||
hydrateRoot,
|
||||
findDOMNode,
|
||||
flushSync,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user