You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm expecting "text 2" to have a red border, rendering inline along with "text 1". However, the border is not rendered.
If I change the container from Text to View, the border renders properly. However, there are scenarios where this is not feasible (e.g.: rendering inside a TextInput.
This issue was previously opened here and, arguably, wrongfully closed. The reason it was marked as closed was:
Nesting a Text component within a parent Text component is not supported.
However, the documentation clearly states the opposite:
Nested text
Both Android and iOS allow you to display formatted text by annotating ranges of a string with specific formatting like bold or colored text (NSAttributedString on iOS, SpannableString on Android). In practice, this is very tedious. For React Native, we decided to use web paradigm for this where you can nest text to achieve the same effect.
Steps to reproduce
Nest one Text element inside another, applying a border width/color to the nested element.
You are on a supported minor version, but it looks like there's a newer patch available - 0.74.5. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.
You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.
Description
I'm rendering several
Text
components wrapped inside a parentText
component, like so:I'm expecting "text 2" to have a red border, rendering inline along with "text 1". However, the border is not rendered.
If I change the container from
Text
toView
, the border renders properly. However, there are scenarios where this is not feasible (e.g.: rendering inside aTextInput
.This issue was previously opened here and, arguably, wrongfully closed. The reason it was marked as closed was:
However, the documentation clearly states the opposite:
Steps to reproduce
Nest one
Text
element inside another, applying a border width/color to the nested element.React Native Version
0.74.3
Affected Platforms
Runtime - Android, Runtime - iOS
Output of
npx react-native info
Reproducer
https://snack.expo.dev/@huggie/nested-text-border-bug
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: