Files
react-native/packages
Pieter De BaetsandFacebook GitHub Bot 2f7957f2fd Merge RawText sequences (#47278)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47278

When we have multiple spans of text inside a <Text> element, React will emit these as separate RawText ShadowNodes. RawText shadow nodes cannot have any properties beyond the text they contain, yet our current AttributedText logic will generate a separate span for each and duplicate all the relevant properties.

This can be particularly inefficient when JSX is used to interpolate strings, e.g. `<Text styles={styles.text}>Example {i}/{count}</Text>` results in 4 raw text elements with duplicated properties.

Changelog: [General][Changed] Improved AttributedText generation for raw text nodes.

Reviewed By: NickGerleman

Differential Revision: D65134912

fbshipit-source-id: dba4296ebe9987e989760cdee66f1e076fbb7a98
2024-11-08 11:32:51 -08:00
..
2024-09-12 09:23:23 -07:00
2024-09-12 09:23:23 -07:00
2024-09-12 09:23:23 -07:00
2024-09-12 09:23:23 -07:00
2024-09-12 09:23:23 -07:00