From b498834eab8d6cef88305f56acb03540d1f2659b Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Mon, 6 May 2024 14:20:08 -0400 Subject: [PATCH] Set enableUseMemoCacheHook to true everywhere (#28964) Set enableUseMemoCacheHook to true everywhere for the next major releases. --- packages/shared/ReactFeatureFlags.js | 2 +- packages/shared/forks/ReactFeatureFlags.native-oss.js | 2 +- packages/shared/forks/ReactFeatureFlags.test-renderer.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/shared/ReactFeatureFlags.js b/packages/shared/ReactFeatureFlags.js index 6273b7aeddc32..15d8b984ba8bd 100644 --- a/packages/shared/ReactFeatureFlags.js +++ b/packages/shared/ReactFeatureFlags.js @@ -104,7 +104,7 @@ export const enableCPUSuspense = __EXPERIMENTAL__; // Enables useMemoCache hook, intended as a compilation target for // auto-memoization. -export const enableUseMemoCacheHook = __EXPERIMENTAL__; +export const enableUseMemoCacheHook = true; // Test this at Meta before enabling. export const enableNoCloningMemoCache = false; diff --git a/packages/shared/forks/ReactFeatureFlags.native-oss.js b/packages/shared/forks/ReactFeatureFlags.native-oss.js index f3cc342017da9..5ee0d16c19e18 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-oss.js +++ b/packages/shared/forks/ReactFeatureFlags.native-oss.js @@ -62,7 +62,7 @@ export const enableServerComponentLogs = __NEXT_RN_MAJOR__; export const debugRenderPhaseSideEffectsForStrictMode = __DEV__; // TODO: decide on React 19 -export const enableUseMemoCacheHook = false; +export const enableUseMemoCacheHook = true; export const enableNoCloningMemoCache = false; export const enableUseDeferredValueInitialArg = __EXPERIMENTAL__; diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.js index 6a6a9c75ece8c..8c9626795b518 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.js @@ -36,7 +36,7 @@ export const disableTextareaChildren = false; export const enableSuspenseAvoidThisFallback = false; export const enableSuspenseAvoidThisFallbackFizz = false; export const enableCPUSuspense = false; -export const enableUseMemoCacheHook = __EXPERIMENTAL__; +export const enableUseMemoCacheHook = true; export const enableNoCloningMemoCache = false; export const enableUseEffectEventHook = false; export const favorSafetyOverHydrationPerf = true;