diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm index baca356003be7f..0a8915da123415 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm @@ -316,6 +316,10 @@ bool enableFabricRenderer() override { return true; } + bool useFabricInterop() override + { + return true; + } bool useTurboModules() override { return true; diff --git a/packages/react-native/ReactCommon/react/config/ReactNativeConfig.cpp b/packages/react-native/ReactCommon/react/config/ReactNativeConfig.cpp index dbeae137424e88..7838f19c4c2384 100644 --- a/packages/react-native/ReactCommon/react/config/ReactNativeConfig.cpp +++ b/packages/react-native/ReactCommon/react/config/ReactNativeConfig.cpp @@ -10,9 +10,6 @@ namespace facebook::react { bool EmptyReactNativeConfig::getBool(const std::string& param) const { - if (param == "react_fabric:enabled_automatic_interop_android") { - return true; - } return false; } diff --git a/packages/react-native/ReactCommon/react/renderer/componentregistry/CMakeLists.txt b/packages/react-native/ReactCommon/react/renderer/componentregistry/CMakeLists.txt index 5ea2f55a490c88..52cc286324bf83 100644 --- a/packages/react-native/ReactCommon/react/renderer/componentregistry/CMakeLists.txt +++ b/packages/react-native/ReactCommon/react/renderer/componentregistry/CMakeLists.txt @@ -23,8 +23,8 @@ target_link_libraries(react_render_componentregistry folly_runtime glog_init jsi - react_config react_debug + react_featureflags react_render_core react_render_debug react_utils diff --git a/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp b/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp index cbf6bcc1bd506f..e1e4f87bb4e135 100644 --- a/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +++ b/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp @@ -9,8 +9,8 @@ #include "componentNameByReactViewName.h" -#include #include +#include #include #include #include @@ -84,11 +84,7 @@ const ComponentDescriptor& ComponentDescriptorRegistry::at( } if (it == _registryByName.end()) { - auto reactNativeConfig_ = - contextContainer_->at>( - "ReactNativeConfig"); - if (reactNativeConfig_->getBool( - "react_fabric:enabled_automatic_interop_android")) { + if (ReactNativeFeatureFlags::useFabricInterop()) { auto componentDescriptor = std::make_shared< const UnstableLegacyViewManagerAutomaticComponentDescriptor>( parameters_, unifiedComponentName);