diff --git a/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm b/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm index b8cffa13138..5324963ea01 100644 --- a/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm @@ -109,14 +109,6 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index"; + (BOOL)isSupported:(NSString *)componentName { - RCTLogNewArchitectureValidation( - RCTNotAllowedInBridgeless, - self, - [NSString - stringWithFormat: - @"Legacy ViewManagers should be migrated to Fabric ComponentViews in the new architecture to reduce risk. Component using interop layer: %@", - componentName]); - // Step 1: check if ViewManager with specified name is supported. BOOL isComponentNameSupported = [[RCTLegacyViewManagerInteropComponentView supportedViewManagers] containsObject:componentName]; diff --git a/React/Fabric/Mounting/RCTComponentViewFactory.mm b/React/Fabric/Mounting/RCTComponentViewFactory.mm index 1487beaa2a9..c2ba53bf29a 100644 --- a/React/Fabric/Mounting/RCTComponentViewFactory.mm +++ b/React/Fabric/Mounting/RCTComponentViewFactory.mm @@ -117,7 +117,16 @@ static Class RCTComponentViewClassWithName(const char } // Fallback 2: Try to use Paper Interop. - if ([RCTLegacyViewManagerInteropComponentView isSupported:RCTNSStringFromString(name)]) { + NSString *componentNameString = RCTNSStringFromString(name); + if ([RCTLegacyViewManagerInteropComponentView isSupported:componentNameString]) { + RCTLogNewArchitectureValidation( + RCTNotAllowedInBridgeless, + self, + [NSString + stringWithFormat: + @"Legacy ViewManagers should be migrated to Fabric ComponentViews in the new architecture to reduce risk. Component using interop layer: %@", + componentNameString]); + auto flavor = std::make_shared(name); auto componentName = ComponentName{flavor->c_str()}; auto componentHandle = reinterpret_cast(componentName);