From 6a16981cbbbd9a52d45d097e89b3acf0b60ca70e Mon Sep 17 00:00:00 2001 From: Ruslan Lesiutin Date: Fri, 31 Jul 2026 13:10:12 -0700 Subject: [PATCH] Add `enableConditionalUseWarning` React feature flag Summary: # Changelog: [Internal] Adds the `enableConditionalUseWarning` dynamic React feature flag, which the React renderer reads from `ReactNativeInternalFeatureFlags`. The flag gates the new warning for conditional use of `use()` based on cache state: https://react.dev/warnings/conditional-use-of-use This is a dev-only warning, I don't see any reasons to control this via gk. Differential Revision: D114407789 --- .../runtime/mocks/ReactNativeInternalFeatureFlags.js | 1 + 1 file changed, 1 insertion(+) diff --git a/private/react-native-fantom/runtime/mocks/ReactNativeInternalFeatureFlags.js b/private/react-native-fantom/runtime/mocks/ReactNativeInternalFeatureFlags.js index 140add8e8685..51f1895e9867 100644 --- a/private/react-native-fantom/runtime/mocks/ReactNativeInternalFeatureFlags.js +++ b/private/react-native-fantom/runtime/mocks/ReactNativeInternalFeatureFlags.js @@ -13,4 +13,5 @@ module.exports = { enableFragmentRefsInstanceHandles: true, enableFragmentRefsTextNodes: true, enableViewTransitionForPersistenceMode: true, + enableConditionalUseWarning: true, };