From 4e2fe10fa388d499ba20a2821c9ddb1a6b129320 Mon Sep 17 00:00:00 2001 From: Timothy Yung Date: Fri, 8 Mar 2024 09:20:03 -0800 Subject: [PATCH] Configure "Always On" Feature Flags for React Native (#28519) ## Summary This PR is a subset of https://github.com/facebook/react/pull/28425, which only includes the feature flags that will be configured as "always on" (i.e. not "dynamic"). The following list summarizes the feature flag changes: * RN FB * Always Enable * enableCache * enableCustomElementPropertySupport * RN OSS * Always Enable * disableLegacyContext * enableCache * enableCustomElementPropertySupport * RN Test * Always Enable * disableModulePatternComponents * enableCustomElementPropertySupport ## How did you test this change? Ran the following successfully: ``` $ yarn test $ yarn flow native $ yarn flow fabric ``` --- packages/shared/forks/ReactFeatureFlags.native-fb.js | 4 ++-- packages/shared/forks/ReactFeatureFlags.native-oss.js | 6 +++--- .../shared/forks/ReactFeatureFlags.test-renderer.native.js | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/shared/forks/ReactFeatureFlags.native-fb.js b/packages/shared/forks/ReactFeatureFlags.native-fb.js index c78362e810e6a..5cdf864d664ee 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-fb.js +++ b/packages/shared/forks/ReactFeatureFlags.native-fb.js @@ -38,7 +38,7 @@ export const enableProfilerCommitHooks = __PROFILE__; export const enableProfilerNestedUpdatePhase = __PROFILE__; export const enableProfilerNestedUpdateScheduledHook = false; export const enableUpdaterTracking = __PROFILE__; -export const enableCache = false; +export const enableCache = true; export const enableLegacyCache = false; export const enableCacheElement = true; export const enableFetchInstrumentation = false; @@ -79,7 +79,7 @@ export const enableLazyContextPropagation = false; export const enableLegacyHidden = false; export const forceConcurrentByDefaultForTesting = false; export const allowConcurrentByDefault = false; -export const enableCustomElementPropertySupport = false; +export const enableCustomElementPropertySupport = true; export const consoleManagedByDevToolsDuringStrictMode = false; diff --git a/packages/shared/forks/ReactFeatureFlags.native-oss.js b/packages/shared/forks/ReactFeatureFlags.native-oss.js index 1db47db31b857..4e2cb98f560c2 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-oss.js +++ b/packages/shared/forks/ReactFeatureFlags.native-oss.js @@ -20,7 +20,7 @@ export const enableProfilerCommitHooks = __PROFILE__; export const enableProfilerNestedUpdatePhase = __PROFILE__; export const enableProfilerNestedUpdateScheduledHook = false; export const enableUpdaterTracking = __PROFILE__; -export const enableCache = false; +export const enableCache = true; export const enableLegacyCache = false; export const enableCacheElement = true; export const enableFetchInstrumentation = false; @@ -35,7 +35,7 @@ export const disableIEWorkarounds = true; export const enableScopeAPI = false; export const enableCreateEventHandleAPI = false; export const enableSuspenseCallback = false; -export const disableLegacyContext = false; +export const disableLegacyContext = true; export const enableTrustedTypesIntegration = false; export const disableTextareaChildren = false; export const disableModulePatternComponents = false; @@ -64,7 +64,7 @@ export const enableLegacyHidden = false; export const forceConcurrentByDefaultForTesting = false; export const enableUnifiedSyncLane = true; export const allowConcurrentByDefault = false; -export const enableCustomElementPropertySupport = false; +export const enableCustomElementPropertySupport = true; export const consoleManagedByDevToolsDuringStrictMode = false; diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js index 5de35a8b21ee2..0aa3ca1a6749c 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js @@ -38,7 +38,7 @@ export const enableSuspenseCallback = false; export const disableLegacyContext = false; export const enableTrustedTypesIntegration = false; export const disableTextareaChildren = false; -export const disableModulePatternComponents = false; +export const disableModulePatternComponents = true; export const enableComponentStackLocations = false; export const enableLegacyFBSupport = false; export const enableFilterEmptyStringAttributesDOM = true; @@ -64,6 +64,7 @@ export const enableLegacyHidden = false; export const forceConcurrentByDefaultForTesting = false; export const enableUnifiedSyncLane = true; export const allowConcurrentByDefault = true; +export const enableCustomElementPropertySupport = true; export const consoleManagedByDevToolsDuringStrictMode = false;