mirror of
https://github.com/facebook/react.git
synced 2026-02-24 12:43:00 +00:00
[flags] cleanup renameElementSymbol (#35600)
Removed the feature flag completely, enabled by default. Will land once I have everything ready on xplat side.
This commit is contained in:
@@ -1085,7 +1085,6 @@ describe('ReactFlight', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// @gate renameElementSymbol
|
||||
it('should emit descriptions of errors in dev', async () => {
|
||||
const ClientErrorBoundary = clientReference(ErrorBoundary);
|
||||
|
||||
|
||||
@@ -498,7 +498,6 @@ describe('ReactComponent', () => {
|
||||
);
|
||||
});
|
||||
|
||||
// @gate renameElementSymbol
|
||||
it('throws if a legacy element is used as a child', async () => {
|
||||
const inlinedElement = {
|
||||
$$typeof: Symbol.for('react.element'),
|
||||
|
||||
@@ -138,12 +138,11 @@ describe('ReactDOMOption', () => {
|
||||
}).rejects.toThrow('Objects are not valid as a React child');
|
||||
});
|
||||
|
||||
// @gate www && !renameElementSymbol
|
||||
it('should support element-ish child', async () => {
|
||||
// This is similar to <fbt>.
|
||||
// We don't toString it because you must instead provide a value prop.
|
||||
const obj = {
|
||||
$$typeof: Symbol.for('react.element'),
|
||||
$$typeof: Symbol.for('react.transitional.element'),
|
||||
type: props => props.content,
|
||||
ref: null,
|
||||
key: null,
|
||||
|
||||
@@ -159,9 +159,6 @@ export const enableInternalInstanceMap: boolean = false;
|
||||
|
||||
// const __NEXT_MAJOR__ = __EXPERIMENTAL__;
|
||||
|
||||
// Renames the internal symbol for elements since they have changed signature/constructor
|
||||
export const renameElementSymbol: boolean = true;
|
||||
|
||||
/**
|
||||
* Enables a fix to run insertion effect cleanup on hidden subtrees.
|
||||
*/
|
||||
|
||||
@@ -7,17 +7,15 @@
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import {renameElementSymbol} from 'shared/ReactFeatureFlags';
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
||||
|
||||
// The Symbol used to tag the ReactElement-like types.
|
||||
export const REACT_LEGACY_ELEMENT_TYPE: symbol = Symbol.for('react.element');
|
||||
export const REACT_ELEMENT_TYPE: symbol = renameElementSymbol
|
||||
? Symbol.for('react.transitional.element')
|
||||
: REACT_LEGACY_ELEMENT_TYPE;
|
||||
export const REACT_ELEMENT_TYPE: symbol = Symbol.for(
|
||||
'react.transitional.element',
|
||||
);
|
||||
export const REACT_PORTAL_TYPE: symbol = Symbol.for('react.portal');
|
||||
export const REACT_FRAGMENT_TYPE: symbol = Symbol.for('react.fragment');
|
||||
export const REACT_STRICT_MODE_TYPE: symbol = Symbol.for('react.strict_mode');
|
||||
|
||||
@@ -23,7 +23,6 @@ describe('ReactSymbols', () => {
|
||||
});
|
||||
};
|
||||
|
||||
// @gate renameElementSymbol
|
||||
it('Symbol values should be unique', () => {
|
||||
expectToBeUnique(Object.entries(require('shared/ReactSymbols')));
|
||||
});
|
||||
|
||||
@@ -22,7 +22,6 @@ export const enableObjectFiber = __VARIANT__;
|
||||
export const enableHiddenSubtreeInsertionEffectCleanup = __VARIANT__;
|
||||
export const enableEagerAlternateStateNodeCleanup = __VARIANT__;
|
||||
export const passChildrenWhenCloningPersistedNodes = __VARIANT__;
|
||||
export const renameElementSymbol = __VARIANT__;
|
||||
export const enableFragmentRefs = __VARIANT__;
|
||||
export const enableFragmentRefsScrollIntoView = __VARIANT__;
|
||||
export const enableFragmentRefsInstanceHandles = __VARIANT__;
|
||||
|
||||
@@ -24,7 +24,6 @@ export const {
|
||||
enableObjectFiber,
|
||||
enableEagerAlternateStateNodeCleanup,
|
||||
passChildrenWhenCloningPersistedNodes,
|
||||
renameElementSymbol,
|
||||
enableFragmentRefs,
|
||||
enableFragmentRefsScrollIntoView,
|
||||
enableFragmentRefsInstanceHandles,
|
||||
|
||||
@@ -52,7 +52,6 @@ export const enableTaint: boolean = true;
|
||||
export const enableTransitionTracing: boolean = false;
|
||||
export const enableTrustedTypesIntegration: boolean = false;
|
||||
export const passChildrenWhenCloningPersistedNodes: boolean = false;
|
||||
export const renameElementSymbol: boolean = true;
|
||||
export const retryLaneExpirationMs = 5000;
|
||||
export const syncLaneExpirationMs = 250;
|
||||
export const transitionLaneExpirationMs = 5000;
|
||||
|
||||
@@ -55,7 +55,6 @@ export const disableClientCache: boolean = true;
|
||||
|
||||
export const enableInfiniteRenderLoopDetection: boolean = false;
|
||||
|
||||
export const renameElementSymbol: boolean = true;
|
||||
export const enableEagerAlternateStateNodeCleanup: boolean = true;
|
||||
|
||||
export const enableYieldingBeforePassive: boolean = true;
|
||||
|
||||
@@ -50,7 +50,6 @@ export const enableTransitionTracing = false;
|
||||
export const enableTrustedTypesIntegration = false;
|
||||
export const enableUpdaterTracking = false;
|
||||
export const passChildrenWhenCloningPersistedNodes = false;
|
||||
export const renameElementSymbol = false;
|
||||
export const retryLaneExpirationMs = 5000;
|
||||
export const syncLaneExpirationMs = 250;
|
||||
export const transitionLaneExpirationMs = 5000;
|
||||
|
||||
@@ -60,8 +60,6 @@ export const enableInfiniteRenderLoopDetection: boolean = false;
|
||||
export const enableReactTestRendererWarning: boolean = false;
|
||||
export const disableLegacyMode: boolean = true;
|
||||
|
||||
export const renameElementSymbol: boolean = false;
|
||||
|
||||
export const enableObjectFiber: boolean = false;
|
||||
export const enableEagerAlternateStateNodeCleanup: boolean = true;
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ export const enableNoCloningMemoCache: boolean = __VARIANT__;
|
||||
export const enableObjectFiber: boolean = __VARIANT__;
|
||||
export const enableRetryLaneExpiration: boolean = __VARIANT__;
|
||||
export const enableTransitionTracing: boolean = __VARIANT__;
|
||||
export const renameElementSymbol: boolean = __VARIANT__;
|
||||
export const retryLaneExpirationMs = 5000;
|
||||
export const syncLaneExpirationMs = 250;
|
||||
export const transitionLaneExpirationMs = 5000;
|
||||
|
||||
@@ -25,7 +25,6 @@ export const {
|
||||
enableRetryLaneExpiration,
|
||||
enableTransitionTracing,
|
||||
enableTrustedTypesIntegration,
|
||||
renameElementSymbol,
|
||||
retryLaneExpirationMs,
|
||||
syncLaneExpirationMs,
|
||||
transitionLaneExpirationMs,
|
||||
|
||||
Reference in New Issue
Block a user