Skip to content

Commit d4d09ac

Browse files
authored
chore: Move one instance of RCTUIView --> RCTPlatformView (#2639)
## Summary: In general, we prefer to use `RCTPlatformView` (`#define NSView`) over `RCTUIView` (subclass of NSView for iOS interop) as it tends to have less "Expected NSView, but got subclass of NSView" style errors. This changes fixes one of those errors
1 parent ab14261 commit d4d09ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ - (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask
244244
NSNumber *index = mountInstruction[kRCTLegacyInteropChildIndexKey];
245245
RCTUIView *childView = mountInstruction[kRCTLegacyInteropChildComponentKey]; // [macOS]
246246
if ([childView isKindOfClass:[RCTLegacyViewManagerInteropComponentView class]]) {
247-
RCTUIView *target = ((RCTLegacyViewManagerInteropComponentView *)childView).contentView; // [macOS]
247+
RCTPlatformView *target = ((RCTLegacyViewManagerInteropComponentView *)childView).contentView; // [macOS]
248248
[_adapter.paperView insertReactSubview:target atIndex:index.integerValue];
249249
} else {
250250
[_adapter.paperView insertReactSubview:childView atIndex:index.integerValue];

0 commit comments

Comments
 (0)