Skip to content

Commit 11f5549

Browse files
author
Jack Pope
committed
Remove unstable_concurrentUpdateByDefault option from RTR
1 parent 3c1ea3c commit 11f5549

File tree

4 files changed

+7
-17
lines changed

4 files changed

+7
-17
lines changed

packages/react-test-renderer/src/ReactTestRenderer.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@ import {checkPropStringCoercion} from 'shared/CheckStringCoercion';
5252

5353
import {getPublicInstance} from './ReactFiberConfigTestHost';
5454
import {ConcurrentRoot, LegacyRoot} from 'react-reconciler/src/ReactRootTags';
55-
import {
56-
allowConcurrentByDefault,
57-
enableReactTestRendererWarning,
58-
} from 'shared/ReactFeatureFlags';
55+
import {enableReactTestRendererWarning} from 'shared/ReactFeatureFlags';
5956

6057
const act = React.act;
6158

@@ -66,8 +63,6 @@ type TestRendererOptions = {
6663
isConcurrent: boolean,
6764
unstable_isConcurrent: boolean,
6865
unstable_strictMode: boolean,
69-
unstable_concurrentUpdatesByDefault: boolean,
70-
...
7166
};
7267

7368
type ReactTestRendererJSON = {
@@ -485,7 +480,6 @@ function create(
485480
let createNodeMock = defaultTestOptions.createNodeMock;
486481
let isConcurrent = false;
487482
let isStrictMode = false;
488-
let concurrentUpdatesByDefault = null;
489483
if (typeof options === 'object' && options !== null) {
490484
if (typeof options.createNodeMock === 'function') {
491485
// $FlowFixMe[incompatible-type] found when upgrading Flow
@@ -500,12 +494,6 @@ function create(
500494
if (options.unstable_strictMode === true) {
501495
isStrictMode = true;
502496
}
503-
if (allowConcurrentByDefault) {
504-
if (options.unstable_concurrentUpdatesByDefault !== undefined) {
505-
concurrentUpdatesByDefault =
506-
options.unstable_concurrentUpdatesByDefault;
507-
}
508-
}
509497
}
510498
let container = {
511499
children: ([]: Array<Instance | TextInstance>),
@@ -517,7 +505,7 @@ function create(
517505
isConcurrent ? ConcurrentRoot : LegacyRoot,
518506
null,
519507
isStrictMode,
520-
concurrentUpdatesByDefault,
508+
false,
521509
'',
522510
onRecoverableError,
523511
null,

packages/shared/ReactFeatureFlags.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,10 @@ export const enableInfiniteRenderLoopDetection = true;
188188
export const enableRefAsProp = __NEXT_MAJOR__;
189189
export const disableStringRefs = __NEXT_MAJOR__;
190190

191+
// Not ready to break experimental yet.
192+
// Needs more internal cleanup
191193
// Warn on any usage of ReactTestRenderer
192-
export const enableReactTestRendererWarning = __NEXT_MAJOR__;
194+
export const enableReactTestRendererWarning = false;
193195

194196
// Disables legacy mode
195197
// This allows us to land breaking changes to remove legacy mode APIs in experimental builds

packages/shared/forks/ReactFeatureFlags.test-renderer.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ export const enableLazyContextPropagation = false;
6161
export const enableLegacyHidden = false;
6262
export const forceConcurrentByDefaultForTesting = false;
6363
export const enableUnifiedSyncLane = true;
64-
export const allowConcurrentByDefault = true;
6564
export const enableCustomElementPropertySupport = true;
6665
export const enableNewBooleanProps = true;
66+
export const allowConcurrentByDefault = false;
6767

6868
export const consoleManagedByDevToolsDuringStrictMode = false;
6969

packages/shared/forks/ReactFeatureFlags.test-renderer.www.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const enableLazyContextPropagation = false;
6161
export const enableLegacyHidden = false;
6262
export const forceConcurrentByDefaultForTesting = false;
6363
export const enableUnifiedSyncLane = true;
64-
export const allowConcurrentByDefault = true;
64+
export const allowConcurrentByDefault = false;
6565
export const enableCustomElementPropertySupport = false;
6666
export const enableNewBooleanProps = false;
6767

0 commit comments

Comments
 (0)