From 2b82832e59773d08b579f6fa3c99fda4fe9f4d05 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Tue, 9 Jan 2024 10:41:43 -0800 Subject: [PATCH] check for prefix in automatic interop layer Summary: changelog: [internal] This mimics what interop layer does in LegacyViewManagerInteropComponentDescriptor. https://www.internalfb.com/code/fbsource/[f80a9affe2cc]/xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm?lines=62 Reviewed By: cipolleschi Differential Revision: D52627132 fbshipit-source-id: 894a40b51ec4189a6bf22db4f612c0b14594d52a --- .../RCTLegacyViewManagerInteropComponentView.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm index 83a61713ce8..830d9aef0dd 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm @@ -147,7 +147,8 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index"; supportedLegacyViewComponents[moduleName] = moduleClass; } - if ([moduleName isEqualToString:componentName]) { + if ([moduleName isEqualToString:componentName] || + [moduleName isEqualToString:[@"RCT" stringByAppendingString:componentName]]) { return YES; } }