react / react/react-native

Text with a View child does not correctly re-render when its text child changes

オープン
#31,341 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Component: Text Issue: Author Provided Repro
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

Description

Consider a Text element with the following children:

  1. 'some text'
  2. <View> // with certain dimensions
  3. '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

  1. Have a Text with the children as specified above
  2. Make the 1st element - text, change its content
  3. Observe the View did not get repositioned accordingly
  4. 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
image image

Snack

https://snack.expo.io/D-ZJ4cWeC

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、2つの Text 子要素とサイズ指定された View を含む Text を使って、リンクされた Snack を Android で実行し、その後、最初の Text 子要素を変更します。位置決めを担う Android の Text/View レイアウト動作を追跡し、テキストの変更後に View が再配置されることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, react-native
領域
mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。