From aef1f9ba1dde30634ad67f53930a6ba75fa318fc Mon Sep 17 00:00:00 2001 From: Arushi Kesarwani Date: Wed, 26 Mar 2025 22:14:50 -0700 Subject: [PATCH] Enable useFabricInterop by default for internal apps (#50295) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50295 Enabling `useFabricInterop` by default for internal apps since before D71582553 iOS wasn't using useFabricInterop in it's codebase and old architecture with Interop enabled is harmless. This is to keep the current behaviour consistent. Changelog: [Internal] Reviewed By: philIip Differential Revision: D71908601 fbshipit-source-id: 825338db486d8f64c44c2d4c28394d8b789c4195 --- .../internal/featureflags/ReactNativeFeatureFlagsDefaults.kt | 4 ++-- .../react/featureflags/ReactNativeFeatureFlagsDefaults.h | 4 ++-- .../scripts/featureflags/ReactNativeFeatureFlags.config.js | 2 +- .../src/private/featureflags/ReactNativeFeatureFlags.js | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt index 80549101e3b..efebbb1b874 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<0c111ea4ea86fce421aa4addb8ad0e4e>> + * @generated SignedSource<<309ae9cf008963de368916b3d28c5491>> */ /** @@ -95,7 +95,7 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun useEditTextStockAndroidFocusBehavior(): Boolean = true - override fun useFabricInterop(): Boolean = false + override fun useFabricInterop(): Boolean = true override fun useNativeViewConfigsInBridgelessMode(): Boolean = false diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index d75747ec0c0..1fbad22d138 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<988e6c024f8526a676dd586cab91c98e>> + * @generated SignedSource<> */ /** @@ -172,7 +172,7 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { } bool useFabricInterop() override { - return false; + return true; } bool useNativeViewConfigsInBridgelessMode() override { diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 270aeae72d5..83b2395ec2d 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -428,7 +428,7 @@ const definitions: FeatureFlagDefinitions = { ossReleaseStage: 'none', }, useFabricInterop: { - defaultValue: false, + defaultValue: true, metadata: { description: 'Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.', diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index 8037f4c1c23..8e103657bf4 100644 --- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> * @flow strict */ @@ -307,7 +307,7 @@ export const useEditTextStockAndroidFocusBehavior: Getter = createNativ /** * Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly. */ -export const useFabricInterop: Getter = createNativeFlagGetter('useFabricInterop', false); +export const useFabricInterop: Getter = createNativeFlagGetter('useFabricInterop', true); /** * When enabled, the native view configs are used in bridgeless mode. */