diff --git a/packages/react/src/__tests__/ReactJSXRuntime-test.js b/packages/react/src/__tests__/ReactJSXRuntime-test.js index 8a63eca32607d..90316cbd70601 100644 --- a/packages/react/src/__tests__/ReactJSXRuntime-test.js +++ b/packages/react/src/__tests__/ReactJSXRuntime-test.js @@ -377,7 +377,7 @@ describe('ReactJSXRuntime', () => { expect(didCall).toBe(false); }); - // @gate enableFastJSX && enableRefAsProp + // @gate enableRefAsProp it('does not clone props object if key and ref is not spread', async () => { const config = { foo: 'foo', diff --git a/packages/react/src/jsx/ReactJSXElement.js b/packages/react/src/jsx/ReactJSXElement.js index 1652b1e2edecc..a0de9c8e145c8 100644 --- a/packages/react/src/jsx/ReactJSXElement.js +++ b/packages/react/src/jsx/ReactJSXElement.js @@ -23,7 +23,6 @@ import { enableRefAsProp, disableStringRefs, disableDefaultPropsExceptForClasses, - enableFastJSX, enableOwnerStacks, } from 'shared/ReactFeatureFlags'; import {checkPropStringCoercion} from 'shared/CheckStringCoercion'; @@ -82,9 +81,7 @@ if (__DEV__) { didWarnAboutElementRef = {}; } -const enableFastJSXWithStringRefs = enableFastJSX && enableRefAsProp; -const enableFastJSXWithoutStringRefs = - enableFastJSXWithStringRefs && disableStringRefs; +const enableFastJSXWithoutStringRefs = enableRefAsProp && disableStringRefs; function hasValidRef(config) { if (__DEV__) { @@ -416,7 +413,7 @@ export function jsxProd(type, config, maybeKey) { let props; if ( (enableFastJSXWithoutStringRefs || - (enableFastJSXWithStringRefs && !('ref' in config))) && + (enableRefAsProp && !('ref' in config))) && !('key' in config) ) { // If key was not spread in, we can reuse the original props object. This @@ -701,7 +698,7 @@ function jsxDEVImpl( let props; if ( (enableFastJSXWithoutStringRefs || - (enableFastJSXWithStringRefs && !('ref' in config))) && + (enableRefAsProp && !('ref' in config))) && !('key' in config) ) { // If key was not spread in, we can reuse the original props object. This diff --git a/packages/shared/ReactFeatureFlags.js b/packages/shared/ReactFeatureFlags.js index 3c2089cb19c13..2e7c9ffea4952 100644 --- a/packages/shared/ReactFeatureFlags.js +++ b/packages/shared/ReactFeatureFlags.js @@ -195,7 +195,6 @@ export const enableInfiniteRenderLoopDetection = true; // during element creation. export const enableRefAsProp = true; export const disableStringRefs = true; -export const enableFastJSX = true; // Warn on any usage of ReactTestRenderer export const enableReactTestRendererWarning = true; diff --git a/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js b/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js index 714c6baf75f1c..a7016626c6691 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js +++ b/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js @@ -19,7 +19,6 @@ export const alwaysThrottleRetries = __VARIANT__; export const enableAddPropertiesFastPath = __VARIANT__; -export const enableFastJSX = __VARIANT__; export const enableObjectFiber = __VARIANT__; export const enableShallowPropDiffing = __VARIANT__; export const passChildrenWhenCloningPersistedNodes = __VARIANT__; diff --git a/packages/shared/forks/ReactFeatureFlags.native-fb.js b/packages/shared/forks/ReactFeatureFlags.native-fb.js index b37f2f4fa0c14..8a5f784ea943f 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-fb.js +++ b/packages/shared/forks/ReactFeatureFlags.native-fb.js @@ -21,7 +21,6 @@ const dynamicFlags: DynamicExportsType = (dynamicFlagsUntyped: any); export const { alwaysThrottleRetries, enableAddPropertiesFastPath, - enableFastJSX, enableObjectFiber, enableShallowPropDiffing, passChildrenWhenCloningPersistedNodes, diff --git a/packages/shared/forks/ReactFeatureFlags.native-oss.js b/packages/shared/forks/ReactFeatureFlags.native-oss.js index 3ef19e4b127e7..e1780bf019faa 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-oss.js +++ b/packages/shared/forks/ReactFeatureFlags.native-oss.js @@ -45,7 +45,6 @@ export const enableCreateEventHandleAPI = false; export const enableDebugTracing = false; export const enableDeferRootSchedulingToMicrotask = true; export const enableDO_NOT_USE_disableStrictPassiveEffect = false; -export const enableFastJSX = true; export const enableFilterEmptyStringAttributesDOM = true; export const enableFizzExternalRuntime = true; export const enableFlightReadableStream = true; diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.js index 5b01abdb496bf..4208674d503be 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.js @@ -89,7 +89,6 @@ export const enableShallowPropDiffing = false; // const __NEXT_MAJOR__ = __EXPERIMENTAL__; export const enableRefAsProp = true; export const disableStringRefs = true; -export const enableFastJSX = true; export const disableLegacyMode = true; export const disableLegacyContext = true; export const disableLegacyContextForFunctionComponents = true; diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js index ebb8964a5b741..f23cdfe8136d3 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js @@ -37,7 +37,6 @@ export const enableCreateEventHandleAPI = false; export const enableDebugTracing = false; export const enableDeferRootSchedulingToMicrotask = true; export const enableDO_NOT_USE_disableStrictPassiveEffect = false; -export const enableFastJSX = true; export const enableFilterEmptyStringAttributesDOM = true; export const enableFizzExternalRuntime = true; export const enableFlightReadableStream = true; diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js index 026c2be4f8c67..1364d2b81abb0 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js @@ -81,7 +81,6 @@ export const enableInfiniteRenderLoopDetection = false; export const enableRefAsProp = true; export const disableStringRefs = false; -export const enableFastJSX = false; export const enableReactTestRendererWarning = false; export const disableLegacyMode = true; diff --git a/packages/shared/forks/ReactFeatureFlags.www-dynamic.js b/packages/shared/forks/ReactFeatureFlags.www-dynamic.js index 34a8ff82fa32a..49814e0d9d6e4 100644 --- a/packages/shared/forks/ReactFeatureFlags.www-dynamic.js +++ b/packages/shared/forks/ReactFeatureFlags.www-dynamic.js @@ -21,7 +21,6 @@ export const disableSchedulerTimeoutInWorkLoop = __VARIANT__; export const enableAddPropertiesFastPath = __VARIANT__; export const enableDeferRootSchedulingToMicrotask = __VARIANT__; export const enableDO_NOT_USE_disableStrictPassiveEffect = __VARIANT__; -export const enableFastJSX = __VARIANT__; export const enableLazyContextPropagation = __VARIANT__; export const enableNoCloningMemoCache = __VARIANT__; export const enableObjectFiber = __VARIANT__; diff --git a/packages/shared/forks/ReactFeatureFlags.www.js b/packages/shared/forks/ReactFeatureFlags.www.js index 3671f40ad8d31..ef118515c0cff 100644 --- a/packages/shared/forks/ReactFeatureFlags.www.js +++ b/packages/shared/forks/ReactFeatureFlags.www.js @@ -23,7 +23,6 @@ export const { enableDebugTracing, enableDeferRootSchedulingToMicrotask, enableDO_NOT_USE_disableStrictPassiveEffect, - enableFastJSX, enableInfiniteRenderLoopDetection, enableLazyContextPropagation, enableNoCloningMemoCache,