Repository navigation
Commit 9edfb68
Mount children of a legacy view right away so its children stay in step with Fabric's
Summary:
`mountChildComponentView:index:` inserted a child only when it was appended (`index == reactSubviews.count`); any other
insertion was queued in `_viewsToBeMounted` until `finalizeUpdates:`, which only runs when the host view itself is updated
(props, state or layout). A transaction that inserts a child before others and leaves the host view unchanged therefore left the
child unmounted until some later update, and every later `index == count` check failed in the meantime, so more children were
queued (the paper view's order drifted from Fabric's).
With an adapter the child is now inserted at its index (clamped to the number of children) straight away, and
`didUpdateReactSubviews` is called as it was for appended children. The queue is only used before the adapter exists.
Changelog:
[IOS] [FIXED] - LegacyViewManagerInterop mounts a child inserted before other children of a legacy view right away
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>1 parent e83e491 commit 9edfb68
1 file changed
Lines changed: 10 additions & 10 deletions
File tree
- packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
177 | | - | |
178 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
179 | 181 | | |
180 | 182 | | |
| 183 | + | |
181 | 184 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
| 187 | + | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| |||
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
198 | | - | |
199 | | - | |
200 | | - | |
| 199 | + | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| |||
0 commit comments