View nested in Text reconciliation bug on Android
See original GitHub issueDescription
When Text
component has another Text
s and View
as children and View
changes position, reconciliation does not work properly on Android. On iOS it works perfectly.
Demo correct behaviour[iOS]:
Demo incorrect behaviour[Android]:
React Native version:
System: OS: macOS 10.15.6 CPU: (16) x64 Intel® Core™ i9-9880H CPU @ 2.30GHz Memory: 760.26 MB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 10.19.0 - ~/.nvm/versions/node/v10.19.0/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.13.4 - ~/.nvm/versions/node/v10.19.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.9.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2 Android SDK: API Levels: 28, 29 Build Tools: 28.0.3, 29.0.2, 29.0.3 System Images: android-29 | Google APIs Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: Not Found Xcode: 11.5/11E608c - /usr/bin/xcodebuild Languages: Java: 1.8.0_242 - /usr/bin/javac Python: 3.7.5 - /Users/fediru/.pyenv/shims/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.2 => 0.63.2 npmGlobalPackages: react-native: Not Found
Steps To Reproduce
See the snack for details
Expected Results
Android platform should behave like iOS.
Snack, code example, screenshot, or link to a repository:
Reproduce snack: https://snack.expo.io/@todorone/view-nested-in-text-bug?platform=android
Research: If we add key={position.toString()}
to root Text
component, then the issue is rectified, so probably the problem is with reconciliation(?)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
@todorone I sent a PR for a similar sounding bug quite a while ago but it hasn’t been merged yet: #24836. Perhaps it would fix your issue as well.
@react-native-bot I’m not sure how to add the issue to “Backlog”