question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

View nested in Text reconciliation bug on Android

See original GitHub issue

Description

When Text component has another Texts and View as children and View changes position, reconciliation does not work properly on Android. On iOS it works perfectly.

Demo correct behaviour[iOS]: bug-ios Demo incorrect behaviour[Android]: bug-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:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
rigderncommented, Aug 16, 2020

@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.

1reaction
todoronecommented, Feb 8, 2021

@react-native-bot I’m not sure how to add the issue to “Backlog”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error in Android: Nesting of View within Text is not supported ...
It 's ok in IOS but in Android, error: Nesting of View within Text is not supported on Android. Codes: <Text style={styles.text}> {'I...
Read more >
Labels - GitLab Docs
Categorize epics, issues, and merge requests using colors and descriptive titles like bug , feature request , or docs . Dynamically filter and...
Read more >
Google Play Developer APIs
... Google Play Store listings, including localized text and graphics ... such as for reporting and reconciliation of individual orders and ...
Read more >
Bug 1343365 - Tree-aware bookmark merging - Bugzilla@Mozilla
(Firefox for Android Graveyard :: Android Sync, defect, P5) ... Import bookmarks/nested folder from another browser on Desktop (Step 1 device) Expected: ...
Read more >
Strict Mode - React
In CSS, the display: contents attribute can be used if you don't want the node to be part ... This sort of subtle...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found