Description
Description
When adding children in a native view that uses the interop layer under Fabric, insertion of children aren't handled correctly. In the example below the yellow view is a native view with no extra features or functionality. The blue squares are regular views. Each square is added to the state when pressing the "Add Square"-button. This is a snapshot after adding 5 squares.
Paper:

Fabric:

Observe that under Fabric only 4 squares are rendered. If you add these children on mount, all children are displayed correctly, so this happens only when adding children to an already mounted native view.
Possible problem
This seems to be related to the order of which the RCTLegacyViewManagerInteropComponentView
new child views are added, where mountChildComponentView
is called without calling finalizeUpdates
after the children was added to the list of children being mounted.
Steps to reproduce
- Download the reproduction app running RN 0.79.2 here: https://github.com/chrfalch/interoplayer-repro
- Build and run (defaults to the new architecture
- Press the "Add Square" button
- Observe that the first new child is only visible in the regular view section
React Native Version
0.79.2
Affected Platforms
Runtime - iOS
Areas
Fabric - The New Renderer
Output of npx @react-native-community/cli info
System:
OS: macOS 15.4.1
CPU: (16) arm64 Apple M4 Max
Memory: 148.73 MB / 64.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.13.1
path: /usr/local/bin/node
Yarn:
version: 1.22.22
path: ~/.npm-global/bin/yarn
npm:
version: 10.9.2
path: /usr/local/bin/npm
Watchman:
version: 2024.12.02.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /Users/chrfalch/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.4
- iOS 18.4
- macOS 15.4
- tvOS 18.4
- visionOS 2.4
- watchOS 11.4
Android SDK:
API Levels:
- "26"
- "31"
- "34"
- "35"
Build Tools:
- 26.0.3
- 34.0.0
- 35.0.0
System Images:
- android-26 | Google APIs Intel x86_64 Atom
- android-31 | Google APIs ARM 64 v8a
- android-34 | Google APIs ARM 64 v8a
- android-34 | Google Play ARM 64 v8a
- android-35-ext14 | Google Play ARM 64 v8a
- android-35 | Google Play ARM 64 v8a
- android-TiramisuPrivacySandbox | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.3 AI-243.24978.46.2431.13363775
Xcode:
version: 16.3/16E140
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.14
path: /usr/bin/javac
Ruby:
version: 3.3.6
path: /Users/chrfalch/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
No crash is happening.
MANDATORY Reproducer
https://github.com/chrfalch/interoplayer-repro
Screenshots and Videos
No response