Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unstable_concurrentUpdateByDefault option from RTR #28489

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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