Skip to content

Commit 5945856

Browse files
habovhclaude
andcommitted
Format RCTLegacyViewManagerInteropComponentView.mm with clang-format
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 9edfb68 commit 5945856

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

‎packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,17 +174,18 @@ - (void)prepareForRecycle
174174
- (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
175175
{
176176
if (_adapter) {
177-
// The child is inserted right away, wherever it goes, so that the paper view's `reactSubviews` stay in step with the
178-
// Fabric children. A mount that waited for `finalizeUpdates:` would be applied late (the host view is not updated
179-
// by every transaction that changes its children) and would shift the position of every later child.
180-
// After the child is added, we need to call didUpdateReactSubviews to make sure that it is rendered.
181-
// Without this change, the new child will not be rendered right away because the didUpdateReactSubviews is not
182-
// called and the `finalizeUpdate` is not invoked.
177+
// The child is inserted right away, wherever it goes, so that the paper view's `reactSubviews` stay in step with
178+
// the Fabric children. A mount that waited for `finalizeUpdates:` would be applied late (the host view is not
179+
// updated by every transaction that changes its children) and would shift the position of every later child. After
180+
// the child is added, we need to call didUpdateReactSubviews to make sure that it is rendered. Without this change,
181+
// the new child will not be rendered right away because the didUpdateReactSubviews is not called and the
182+
// `finalizeUpdate` is not invoked.
183183
UIView *target = childComponentView;
184184
if ([childComponentView isKindOfClass:[RCTLegacyViewManagerInteropComponentView class]]) {
185185
target = ((RCTLegacyViewManagerInteropComponentView *)childComponentView).contentView;
186186
}
187-
[_adapter.paperView insertReactSubview:target atIndex:MIN(index, (NSInteger)_adapter.paperView.reactSubviews.count)];
187+
[_adapter.paperView insertReactSubview:target
188+
atIndex:MIN(index, (NSInteger)_adapter.paperView.reactSubviews.count)];
188189
[_adapter.paperView didUpdateReactSubviews];
189190
} else {
190191
[_viewsToBeMounted addObject:@{

0 commit comments

Comments
 (0)