Skip to content

Commit e1b5512

Browse files
rubennortefacebook-github-bot
authored andcommitted
Migrate feature flag for automatic Fabric interop to new feature flag system
Summary: Changelog: [internal] Differential Revision: D65062305
1 parent ca56996 commit e1b5512

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm

+4
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,10 @@ bool enableFabricRenderer() override
316316
{
317317
return true;
318318
}
319+
bool useFabricInterop() override
320+
{
321+
return true;
322+
}
319323
bool useTurboModules() override
320324
{
321325
return true;

packages/react-native/ReactCommon/react/config/ReactNativeConfig.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
namespace facebook::react {
1111

1212
bool EmptyReactNativeConfig::getBool(const std::string& param) const {
13-
if (param == "react_fabric:enabled_automatic_interop_android") {
14-
return true;
15-
}
1613
return false;
1714
}
1815

packages/react-native/ReactCommon/react/renderer/componentregistry/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ target_link_libraries(react_render_componentregistry
2323
folly_runtime
2424
glog_init
2525
jsi
26-
react_config
2726
react_debug
27+
react_featureflags
2828
react_render_core
2929
react_render_debug
3030
react_utils

packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
#include "componentNameByReactViewName.h"
1111

12-
#include <react/config/ReactNativeConfig.h>
1312
#include <react/debug/react_native_assert.h>
13+
#include <react/featureflags/ReactNativeFeatureFlags.h>
1414
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
1515
#include <react/renderer/components/legacyviewmanagerinterop/UnstableLegacyViewManagerAutomaticComponentDescriptor.h>
1616
#include <react/renderer/components/legacyviewmanagerinterop/UnstableLegacyViewManagerAutomaticShadowNode.h>
@@ -84,11 +84,7 @@ const ComponentDescriptor& ComponentDescriptorRegistry::at(
8484
}
8585

8686
if (it == _registryByName.end()) {
87-
auto reactNativeConfig_ =
88-
contextContainer_->at<std::shared_ptr<const ReactNativeConfig>>(
89-
"ReactNativeConfig");
90-
if (reactNativeConfig_->getBool(
91-
"react_fabric:enabled_automatic_interop_android")) {
87+
if (ReactNativeFeatureFlags::useFabricInterop()) {
9288
auto componentDescriptor = std::make_shared<
9389
const UnstableLegacyViewManagerAutomaticComponentDescriptor>(
9490
parameters_, unifiedComponentName);

0 commit comments

Comments
 (0)