Skip to content

Commit 188a66d

Browse files
sherginfacebook-github-bot
authored andcommitted
Fabric: Empty (no-op) layoutSubviews method was removed from RCTComponentView.
Summary: The method does not do anything besides calling a super method. Even if this method does nothing special, overriding it can have negative performance implications. Changelog: [Internal] Fabric-specific internal change. Reviewed By: sammy-SC Differential Revision: D22309895 fbshipit-source-id: bd8237d15df20017629223f278b1b6ac628b0cc7
1 parent 753fdeb commit 188a66d

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,6 @@ - (void)setContentView:(UIView *)contentView
5353
}
5454
}
5555

56-
- (void)layoutSubviews
57-
{
58-
[super layoutSubviews];
59-
// Consider whether using `updateLayoutMetrics:oldLayoutMetrics`
60-
// isn't more appropriate for your use case. `layoutSubviews` is called
61-
// by UIKit while `updateLayoutMetrics:oldLayoutMetrics` is called
62-
// by React Native Renderer within `CATransaction`.
63-
// If you are calling `setFrame:` or other methods that cause
64-
// `layoutSubviews` to be triggered, `_contentView`'s and `_borderLayout`'s
65-
// frames might get out of sync with `self.bounds`.
66-
}
67-
6856
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
6957
{
7058
if (UIEdgeInsetsEqualToEdgeInsets(self.hitTestEdgeInsets, UIEdgeInsetsZero)) {

0 commit comments

Comments
 (0)