Skip to content

Commit 34ee899

Browse files
committed
Use concurrent root in RTR (#28498)
Based on - #28497 - #28419 Reusing the disableLegacyMode flag, we set ReactTestRenderer to always render with concurrent root where legacy APIs are no longer available. If disableLegacyMode is false, we continue to allow the unstable_isConcurrent option determine the root type. Also checking a global `IS_REACT_NATIVE_TEST_ENVIRONMENT` so we can maintain the existing behavior for RN until we remove legacy root support there. DiffTrain build for [bb66aa3](bb66aa3)
1 parent 71cc6ab commit 34ee899

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
84c84d72f11ff1961a103b3cd59919876e48f759
1+
bb66aa3cef4e42aee790200d03cf7a82659da121

compiled/facebook-www/ReactTestRenderer-dev.classic.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ if (__DEV__) {
144144
var enableLegacyHidden = false;
145145
var enableAsyncActions = true;
146146
var alwaysThrottleRetries = true;
147+
var disableLegacyMode = false;
147148

148149
var FunctionComponent = 0;
149150
var ClassComponent = 1;
@@ -26108,7 +26109,7 @@ if (__DEV__) {
2610826109
return root;
2610926110
}
2611026111

26111-
var ReactVersion = "19.0.0-www-classic-4c1f5e46";
26112+
var ReactVersion = "19.0.0-www-classic-ac0f08bc";
2611226113

2611326114
// Might add PROFILE later.
2611426115

@@ -27002,7 +27003,8 @@ if (__DEV__) {
2700227003

2700327004
function create(element, options) {
2700427005
var createNodeMock = defaultTestOptions.createNodeMock;
27005-
var isConcurrent = false;
27006+
var isConcurrentOnly = disableLegacyMode === true;
27007+
var isConcurrent = isConcurrentOnly;
2700627008
var isStrictMode = false;
2700727009
var concurrentUpdatesByDefault = null;
2700827010

@@ -27012,8 +27014,8 @@ if (__DEV__) {
2701227014
createNodeMock = options.createNodeMock;
2701327015
}
2701427016

27015-
if (options.unstable_isConcurrent === true) {
27016-
isConcurrent = true;
27017+
{
27018+
isConcurrent = options.unstable_isConcurrent;
2701727019
}
2701827020

2701927021
if (options.unstable_strictMode === true) {

compiled/facebook-www/ReactTestRenderer-dev.modern.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ if (__DEV__) {
144144
var enableLegacyHidden = false;
145145
var enableAsyncActions = true;
146146
var alwaysThrottleRetries = true;
147+
var disableLegacyMode = false;
147148

148149
var FunctionComponent = 0;
149150
var ClassComponent = 1;
@@ -26108,7 +26109,7 @@ if (__DEV__) {
2610826109
return root;
2610926110
}
2611026111

26111-
var ReactVersion = "19.0.0-www-modern-4c1f5e46";
26112+
var ReactVersion = "19.0.0-www-modern-ac0f08bc";
2611226113

2611326114
// Might add PROFILE later.
2611426115

@@ -27002,7 +27003,8 @@ if (__DEV__) {
2700227003

2700327004
function create(element, options) {
2700427005
var createNodeMock = defaultTestOptions.createNodeMock;
27005-
var isConcurrent = false;
27006+
var isConcurrentOnly = disableLegacyMode === true;
27007+
var isConcurrent = isConcurrentOnly;
2700627008
var isStrictMode = false;
2700727009
var concurrentUpdatesByDefault = null;
2700827010

@@ -27012,8 +27014,8 @@ if (__DEV__) {
2701227014
createNodeMock = options.createNodeMock;
2701327015
}
2701427016

27015-
if (options.unstable_isConcurrent === true) {
27016-
isConcurrent = true;
27017+
{
27018+
isConcurrent = options.unstable_isConcurrent;
2701727019
}
2701827020

2701927021
if (options.unstable_strictMode === true) {

0 commit comments

Comments
 (0)