Commit f14d1f9
fix(core): Prevent text duplication from props.children and HostText child fibers
In real React Native fiber trees, <Text>Hello</Text> has both
memoizedProps.children = 'Hello' on the Text fiber and a child HostText
fiber with memoizedProps = 'Hello'. Skip child recursion when
props.children is a string to avoid collecting the same text twice.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 92517ae commit f14d1f9
2 files changed
Lines changed: 41 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
487 | 488 | | |
488 | 489 | | |
| 490 | + | |
| 491 | + | |
489 | 492 | | |
| 493 | + | |
| 494 | + | |
490 | 495 | | |
491 | 496 | | |
492 | | - | |
493 | 497 | | |
494 | 498 | | |
495 | 499 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
937 | 973 | | |
938 | 974 | | |
939 | 975 | | |
| |||
0 commit comments