Skip to content

Commit

Permalink
Remove unstable_concurrentUpdateByDefault option from RTR
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Pope committed Mar 14, 2024
1 parent 9ffe910 commit be25aae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
16 changes: 2 additions & 14 deletions packages/react-test-renderer/src/ReactTestRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ import {checkPropStringCoercion} from 'shared/CheckStringCoercion';

import {getPublicInstance} from './ReactFiberConfigTestHost';
import {ConcurrentRoot, LegacyRoot} from 'react-reconciler/src/ReactRootTags';
import {
allowConcurrentByDefault,
enableReactTestRendererWarning,
} from 'shared/ReactFeatureFlags';
import {enableReactTestRendererWarning} from 'shared/ReactFeatureFlags';

const act = React.act;

Expand All @@ -66,8 +63,6 @@ type TestRendererOptions = {
isConcurrent: boolean,
unstable_isConcurrent: boolean,
unstable_strictMode: boolean,
unstable_concurrentUpdatesByDefault: boolean,
...
};

type ReactTestRendererJSON = {
Expand Down Expand Up @@ -485,7 +480,6 @@ function create(
let createNodeMock = defaultTestOptions.createNodeMock;
let isConcurrent = false;
let isStrictMode = false;
let concurrentUpdatesByDefault = null;
if (typeof options === 'object' && options !== null) {
if (typeof options.createNodeMock === 'function') {
// $FlowFixMe[incompatible-type] found when upgrading Flow
Expand All @@ -500,12 +494,6 @@ function create(
if (options.unstable_strictMode === true) {
isStrictMode = true;
}
if (allowConcurrentByDefault) {
if (options.unstable_concurrentUpdatesByDefault !== undefined) {
concurrentUpdatesByDefault =
options.unstable_concurrentUpdatesByDefault;
}
}
}
let container = {
children: ([]: Array<Instance | TextInstance>),
Expand All @@ -517,7 +505,7 @@ function create(
isConcurrent ? ConcurrentRoot : LegacyRoot,
null,
isStrictMode,
concurrentUpdatesByDefault,
false,
'',
onRecoverableError,
null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ export const enableLazyContextPropagation = false;
export const enableLegacyHidden = false;
export const forceConcurrentByDefaultForTesting = false;
export const enableUnifiedSyncLane = true;
export const allowConcurrentByDefault = true;
export const enableCustomElementPropertySupport = true;
export const enableNewBooleanProps = true;
export const allowConcurrentByDefault = false;

export const consoleManagedByDevToolsDuringStrictMode = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const enableLazyContextPropagation = false;
export const enableLegacyHidden = false;
export const forceConcurrentByDefaultForTesting = false;
export const enableUnifiedSyncLane = true;
export const allowConcurrentByDefault = true;
export const allowConcurrentByDefault = false;
export const enableCustomElementPropertySupport = false;
export const enableNewBooleanProps = false;

Expand Down

0 comments on commit be25aae

Please sign in to comment.