Description
With SwiftUI-based filters enabled, Fabric view recycling can collapse the content inside RCTSwiftUIContainerView.
The outer RCTViewComponentView and _UIHostingView retain their expected height, but the internal SwiftUI hierarchy becomes zero-height.
As a result, the React Native child still has the correct frame but is invisible because its SwiftUI wrapper has zero height.
I reproduced this consistently on the two iOS versions I tested: iOS 16.0 and iOS 26.5. Disabling safe-area handling for the hosting controller fixed the issue on both versions.
If this fix makes sense, I’m happy to submit a PR.
Tested on React Native main at commit ad870da.
Steps to reproduce
- Clone the reproducer:
https://github.com/lujjjh/react-native-swiftui-filter-repro/tree/repro/ios-swiftui-filter-recycle
- Install dependencies and prepare RNTester for iOS.
- Build and launch RNTester.
- Open the Playground tab.
- Wait approximately 1.5 seconds.
Expected:
The orange content fills the purple 28×28 outline.
Actual:
Only the purple outline is visible because the internal SwiftUI wrapper has zero height.
React Native Version
0.87.0
Affected Platforms
Runtime - iOS, Build - MacOS
Output of npx @react-native-community/cli info
System:
OS: macOS 26.5.2
CPU: (18) arm64 Apple M5 Pro
Binaries:
Node: 26.5.0
Yarn: 1.22.22
npm: 11.17.0
Managers:
CocoaPods: 1.16.2
SDKs:
iOS SDK: 26.5
IDEs:
Xcode: 26.6/17F113
Languages:
Ruby: 2.6.10
Stacktrace or Logs
There is no crash or JavaScript error.
RCTViewComponentView 28
_UIHostingView<SwiftUIContainerView> 28
_UIInheritedView 0
PlatformViewHost<UIViewWrapper> 0
UIView wrapper 0
RCTViewComponentView child 28
MANDATORY Reproducer
https://github.com/lujjjh/react-native-swiftui-filter-repro/tree/repro/ios-swiftui-filter-recycle
Screenshots and Videos

Description
With SwiftUI-based filters enabled, Fabric view recycling can collapse the content inside
RCTSwiftUIContainerView.The outer
RCTViewComponentViewand_UIHostingViewretain their expected height, but the internal SwiftUI hierarchy becomes zero-height.As a result, the React Native child still has the correct frame but is invisible because its SwiftUI wrapper has zero height.
I reproduced this consistently on the two iOS versions I tested: iOS 16.0 and iOS 26.5. Disabling safe-area handling for the hosting controller fixed the issue on both versions.
If this fix makes sense, I’m happy to submit a PR.
Tested on React Native main at commit ad870da.
Steps to reproduce
https://github.com/lujjjh/react-native-swiftui-filter-repro/tree/repro/ios-swiftui-filter-recycle
Expected:
The orange content fills the purple 28×28 outline.
Actual:
Only the purple outline is visible because the internal SwiftUI wrapper has zero height.
React Native Version
0.87.0
Affected Platforms
Runtime - iOS, Build - MacOS
Output of
npx @react-native-community/cli infoStacktrace or Logs
MANDATORY Reproducer
https://github.com/lujjjh/react-native-swiftui-filter-repro/tree/repro/ios-swiftui-filter-recycle
Screenshots and Videos