diff --git a/fixtures/unstable-async/time-slicing/src/index.js b/fixtures/unstable-async/time-slicing/src/index.js index 0b1436e04eceb..8b84d723acf4b 100644 --- a/fixtures/unstable-async/time-slicing/src/index.js +++ b/fixtures/unstable-async/time-slicing/src/index.js @@ -147,8 +147,8 @@ class App extends PureComponent { const container = document.getElementById('root'); render( - + - , + , container ); diff --git a/packages/react-dom/src/__tests__/ReactDOMFiberAsync-test.internal.js b/packages/react-dom/src/__tests__/ReactDOMFiberAsync-test.internal.js index 5768aa5f5d45d..84cfb049f0a01 100644 --- a/packages/react-dom/src/__tests__/ReactDOMFiberAsync-test.internal.js +++ b/packages/react-dom/src/__tests__/ReactDOMFiberAsync-test.internal.js @@ -14,7 +14,7 @@ let ReactFeatureFlags = require('shared/ReactFeatureFlags'); let ReactDOM; -const AsyncMode = React.unstable_AsyncMode; +const ConcurrentMode = React.unstable_ConcurrentMode; const setUntrackedInputValue = Object.getOwnPropertyDescriptor( HTMLInputElement.prototype, @@ -108,9 +108,9 @@ describe('ReactDOMFiberAsync', () => { } } ReactDOM.render( - + - , + , container, ); expect(asyncValueRef.current.textContent).toBe(''); @@ -137,17 +137,17 @@ describe('ReactDOMFiberAsync', () => { it('renders synchronously', () => { ReactDOM.render( - +
Hi
-
, + , container, ); expect(container.textContent).toEqual('Hi'); ReactDOM.render( - +
Bye
-
, + , container, ); expect(container.textContent).toEqual('Bye'); @@ -197,7 +197,7 @@ describe('ReactDOMFiberAsync', () => { expect(container.textContent).toEqual('1'); }); - it('AsyncMode creates an async subtree', () => { + it('ConcurrentMode creates an async subtree', () => { let instance; class Component extends React.Component { state = {step: 0}; @@ -208,9 +208,9 @@ describe('ReactDOMFiberAsync', () => { } ReactDOM.render( - + - , + , container, ); jest.runAllTimers(); @@ -233,9 +233,9 @@ describe('ReactDOMFiberAsync', () => { ReactDOM.render(
- + - +
, container, ); @@ -364,9 +364,9 @@ describe('ReactDOMFiberAsync', () => { } ReactDOM.render( - + - , + , container, ); jest.runAllTimers(); @@ -409,9 +409,9 @@ describe('ReactDOMFiberAsync', () => { } } ReactDOM.render( - + - , + , container, ); expect(container.textContent).toEqual('0'); diff --git a/packages/react-dom/src/__tests__/ReactDOMRoot-test.js b/packages/react-dom/src/__tests__/ReactDOMRoot-test.js index 9f7801d2246cb..4157e64b46cad 100644 --- a/packages/react-dom/src/__tests__/ReactDOMRoot-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMRoot-test.js @@ -12,7 +12,7 @@ let React = require('react'); let ReactDOM = require('react-dom'); let ReactDOMServer = require('react-dom/server'); -let AsyncMode = React.unstable_AsyncMode; +let ConcurrentMode = React.unstable_ConcurrentMode; describe('ReactDOMRoot', () => { let container; @@ -63,7 +63,7 @@ describe('ReactDOMRoot', () => { React = require('react'); ReactDOM = require('react-dom'); ReactDOMServer = require('react-dom/server'); - AsyncMode = React.unstable_AsyncMode; + ConcurrentMode = React.unstable_ConcurrentMode; }); it('renders children', () => { @@ -85,7 +85,7 @@ describe('ReactDOMRoot', () => { it('`root.render` returns a thenable work object', () => { const root = ReactDOM.unstable_createRoot(container); - const work = root.render(Hi); + const work = root.render(Hi); let ops = []; work.then(() => { ops.push('inside callback: ' + container.textContent); @@ -103,7 +103,7 @@ describe('ReactDOMRoot', () => { it('resolves `work.then` callback synchronously if the work already committed', () => { const root = ReactDOM.unstable_createRoot(container); - const work = root.render(Hi); + const work = root.render(Hi); jest.runAllTimers(); let ops = []; work.then(() => { @@ -196,9 +196,9 @@ describe('ReactDOMRoot', () => { const root = ReactDOM.unstable_createRoot(container); const batch = root.createBatch(); batch.render( - + - , + , ); jest.runAllTimers(); @@ -246,7 +246,7 @@ describe('ReactDOMRoot', () => { it('can wait for a batch to finish', () => { const root = ReactDOM.unstable_createRoot(container); const batch = root.createBatch(); - batch.render(Foo); + batch.render(Foo); jest.runAllTimers(); @@ -286,7 +286,7 @@ describe('ReactDOMRoot', () => { it('can commit an empty batch', () => { const root = ReactDOM.unstable_createRoot(container); - root.render(1); + root.render(1); advanceCurrentTime(2000); // This batch has a later expiration time than the earlier update. diff --git a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationModes-test.js b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationModes-test.js index ce37aa61616fb..3a4abc6abb249 100644 --- a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationModes-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationModes-test.js @@ -104,36 +104,36 @@ describe('ReactDOMServerIntegration', () => { }); }); - describe('React.unstable_AsyncMode', () => { - itRenders('an async mode with one child', async render => { + describe('React.unstable_ConcurrentMode', () => { + itRenders('an concurrent mode with one child', async render => { let e = await render( - +
text1
-
, + , ); let parent = e.parentNode; expect(parent.childNodes[0].tagName).toBe('DIV'); }); - itRenders('an async mode with several children', async render => { + itRenders('an concurrent mode with several children', async render => { let Header = props => { return

header

; }; let Footer = props => { return ( - +

footer

about

-
+ ); }; let e = await render( - +
text1
text2