diff --git a/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js b/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js index ccaa927e65c57..43de0f5f2aedb 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js +++ b/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js @@ -21,11 +21,16 @@ import typeof * as DynamicFlagsType from 'ReactNativeInternalFeatureFlags'; // update the test configuration. export const alwaysThrottleRetries = __VARIANT__; +export const consoleManagedByDevToolsDuringStrictMode = __VARIANT__; +export const enableAsyncActions = __VARIANT__; export const enableComponentStackLocations = __VARIANT__; export const enableDeferRootSchedulingToMicrotask = __VARIANT__; +export const enableInfiniteRenderLoopDetection = __VARIANT__; +export const enableRenderableContext = __VARIANT__; export const enableUseRefAccessWarning = __VARIANT__; export const passChildrenWhenCloningPersistedNodes = __VARIANT__; export const useMicrotasksForSchedulingInFabric = __VARIANT__; +export const useModernStrictMode = __VARIANT__; // Flow magic to verify the exports of this file match the original version. ((((null: any): ExportsType): DynamicFlagsType): ExportsType); diff --git a/packages/shared/forks/ReactFeatureFlags.native-fb.js b/packages/shared/forks/ReactFeatureFlags.native-fb.js index 42d7a0bbcf992..eeb13e8fd68ec 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-fb.js +++ b/packages/shared/forks/ReactFeatureFlags.native-fb.js @@ -19,11 +19,16 @@ import * as dynamicFlags from 'ReactNativeInternalFeatureFlags'; // the exports object every time a flag is read. export const { alwaysThrottleRetries, + consoleManagedByDevToolsDuringStrictMode, + enableAsyncActions, enableComponentStackLocations, enableDeferRootSchedulingToMicrotask, + enableInfiniteRenderLoopDetection, + enableRenderableContext, enableUseRefAccessWarning, passChildrenWhenCloningPersistedNodes, useMicrotasksForSchedulingInFabric, + useModernStrictMode, } = dynamicFlags; // The rest of the flags are static for better dead code elimination. @@ -36,7 +41,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; @@ -66,7 +71,6 @@ export const enableClientRenderFallbackOnTextMismatch = true; export const enableLegacyFBSupport = false; export const enableFilterEmptyStringAttributesDOM = true; export const enableGetInspectorDataForInstanceInProduction = true; -export const enableRenderableContext = false; export const enableRetryLaneExpiration = false; export const retryLaneExpirationMs = 5000; @@ -78,25 +82,20 @@ export const enableLazyContextPropagation = false; export const enableLegacyHidden = false; export const forceConcurrentByDefaultForTesting = false; export const allowConcurrentByDefault = false; -export const enableCustomElementPropertySupport = false; - -export const consoleManagedByDevToolsDuringStrictMode = false; +export const enableCustomElementPropertySupport = true; export const enableTransitionTracing = false; export const enableFloat = true; -export const useModernStrictMode = false; export const enableDO_NOT_USE_disableStrictPassiveEffect = false; export const enableFizzExternalRuntime = true; -export const enableAsyncActions = false; -export const enableUseDeferredValueInitialArg = true; +export const enableUseDeferredValueInitialArg = __EXPERIMENTAL__; export const disableClientCache = true; export const enableServerComponentKeys = true; export const enableServerComponentLogs = true; -export const enableInfiniteRenderLoopDetection = false; // TODO: Roll out with GK. Don't keep as dynamic flag for too long, though, // because JSX is an extremely hot path. diff --git a/packages/shared/forks/ReactFeatureFlags.native-oss.js b/packages/shared/forks/ReactFeatureFlags.native-oss.js index fe0458e3ded62..1472a81398a7b 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-oss.js +++ b/packages/shared/forks/ReactFeatureFlags.native-oss.js @@ -13,14 +13,14 @@ import typeof * as ExportsType from './ReactFeatureFlags.native-oss'; export const debugRenderPhaseSideEffectsForStrictMode = __DEV__; export const enableDebugTracing = false; export const enableAsyncDebugInfo = false; -export const enableSchedulingProfiler = false; +export const enableSchedulingProfiler = __PROFILE__; export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__; export const enableProfilerTimer = __PROFILE__; 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 f1d91a36e6456..1924abaee52ae 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js @@ -13,7 +13,7 @@ import typeof * as ExportsType from './ReactFeatureFlags.test-renderer'; export const debugRenderPhaseSideEffectsForStrictMode = false; export const enableDebugTracing = false; export const enableAsyncDebugInfo = false; -export const enableSchedulingProfiler = false; +export const enableSchedulingProfiler = __PROFILE__; export const replayFailedUnitOfWorkWithInvokeGuardedCallback = false; export const enableProfilerTimer = __PROFILE__; export const enableProfilerCommitHooks = __PROFILE__; @@ -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; // TODO: Verify safety of enabling. export const enableTrustedTypesIntegration = false; export const disableTextareaChildren = false; export const disableModulePatternComponents = false; @@ -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; diff --git a/scripts/flow/xplat.js b/scripts/flow/xplat.js index 33d061083985c..6d86c3b0b933e 100644 --- a/scripts/flow/xplat.js +++ b/scripts/flow/xplat.js @@ -9,9 +9,14 @@ declare module 'ReactNativeInternalFeatureFlags' { declare export var alwaysThrottleRetries: boolean; + declare export var consoleManagedByDevToolsDuringStrictMode: boolean; + declare export var enableAsyncActions: boolean; declare export var enableComponentStackLocations: boolean; declare export var enableDeferRootSchedulingToMicrotask: boolean; + declare export var enableInfiniteRenderLoopDetection: boolean; + declare export var enableRenderableContext: boolean; declare export var enableUseRefAccessWarning: boolean; declare export var passChildrenWhenCloningPersistedNodes: boolean; declare export var useMicrotasksForSchedulingInFabric: boolean; + declare export var useModernStrictMode: boolean; }