Text with a View child does not correctly re-render when its text child changes
Open
Nobody has claimed this yet.
Component: Text
Issue: Author Provided Repro
- Dominant language
- C++
- Stars
- 127k
- Forks
- 25.3k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 4
Description
Description
Consider a Text element with the following children:
'some text'<View>// with certain dimensions'some text'
When the first child changes content - triggering the render of Text component, the View is not repositioned accordingly.
React Native version:
0.64.0, 0.63.2
react version: 17.0.1
Steps To Reproduce
- Have a
Textwith the children as specified above - Make the 1st element - text, change its content
- Observe the
Viewdid not get repositioned accordingly - Repro on Android
Expected Results
The child Views get repositioned accordingly, if necessary, when the Text re-renders.
Screenshots
| Initial render | After the 1st child changes |
|---|---|
![]() |
![]() |
Snack
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the linked Snack on Android with a Text containing two text children and a dimensioned View, then change the first text child. Trace the Android Text/View layout behavior responsible for positioning and verify that the View is repositioned after the text changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100

