From 47c04ca985d9b058bd5f5edc34443d059d89f8a5 Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Tue, 25 Jun 2024 08:59:32 -0700 Subject: [PATCH] Enable `enableDeferRootSchedulingToMicrotask` and `enableInfiniteRenderLoopDetection` for React Native (Meta) --- packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js | 2 -- packages/shared/forks/ReactFeatureFlags.native-fb.js | 4 ++-- .../shared/forks/ReactFeatureFlags.test-renderer.native-fb.js | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js b/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js index ecdb3755691d2..a0513f81e7bf7 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js +++ b/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js @@ -21,8 +21,6 @@ export const alwaysThrottleRetries = __VARIANT__; export const consoleManagedByDevToolsDuringStrictMode = __VARIANT__; export const disableDefaultPropsExceptForClasses = __VARIANT__; export const enableAddPropertiesFastPath = __VARIANT__; -export const enableDeferRootSchedulingToMicrotask = __VARIANT__; export const enableFastJSX = __VARIANT__; -export const enableInfiniteRenderLoopDetection = __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 de6086c33f257..353937a7eaed8 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-fb.js +++ b/packages/shared/forks/ReactFeatureFlags.native-fb.js @@ -23,9 +23,7 @@ export const { consoleManagedByDevToolsDuringStrictMode, disableDefaultPropsExceptForClasses, enableAddPropertiesFastPath, - enableDeferRootSchedulingToMicrotask, enableFastJSX, - enableInfiniteRenderLoopDetection, enableShallowPropDiffing, passChildrenWhenCloningPersistedNodes, } = dynamicFlags; @@ -51,11 +49,13 @@ export const enableComponentStackLocations = true; export const enableCPUSuspense = true; export const enableCreateEventHandleAPI = false; export const enableDebugTracing = false; +export const enableDeferRootSchedulingToMicrotask = true; export const enableDO_NOT_USE_disableStrictPassiveEffect = false; export const enableFilterEmptyStringAttributesDOM = true; export const enableFizzExternalRuntime = true; export const enableFlightReadableStream = true; export const enableGetInspectorDataForInstanceInProduction = true; +export const enableInfiniteRenderLoopDetection = true; export const enableLazyContextPropagation = false; export const enableLegacyCache = false; export const enableLegacyFBSupport = false; diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js index 63fa1a451459a..5d256ca9e06c1 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js @@ -34,14 +34,14 @@ export const enableComponentStackLocations = true; export const enableCPUSuspense = true; export const enableCreateEventHandleAPI = false; export const enableDebugTracing = false; -export const enableDeferRootSchedulingToMicrotask = 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; export const enableGetInspectorDataForInstanceInProduction = false; -export const enableInfiniteRenderLoopDetection = false; +export const enableInfiniteRenderLoopDetection = true; export const enableLazyContextPropagation = false; export const enableLegacyCache = false; export const enableLegacyFBSupport = false;