Skip to content

Commit

Permalink
Deprecate UIManager.measureLayoutRelativeToParent
Browse files Browse the repository at this point in the history
Summary:
UIManager.measureLayoutRelativeToParent will not be supported as part of fabric.
This diff deprecates this method in the current version or React Native.

Reviewed By: fkgozali

Differential Revision: D16471845

fbshipit-source-id: acfda9bfb2dd8553ff8e359ea2c8d7d88a14c6d2
  • Loading branch information
mdvacca authored and facebook-github-bot committed Jul 25, 2019
1 parent 8131b7b commit e42009b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions React/Modules/RCTUIManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,7 @@ static void RCTMeasureLayout(RCTShadowView *view,
errorCallback:(__unused RCTResponseSenderBlock)errorCallback
callback:(RCTResponseSenderBlock)callback)
{
RCTLogWarn(@"RCTUIManager.measureLayoutRelativeToParent method is deprecated and it will not be implemented in newer versions of RN (Fabric) - T47686450");
RCTShadowView *shadowView = _shadowViewRegistry[reactTag];
RCTMeasureLayout(shadowView, shadowView.reactSuperview, callback);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,11 @@ public void measureLayout(
* <p>NB: Unlike {@link #measure}, this will measure relative to the view layout, not the visible
* window which can cause unexpected results when measuring relative to things like ScrollViews
* that can have offset content on the screen.
*
* @deprecated This method will not be part of Fabric.
*/
@ReactMethod
@Deprecated
public void measureLayoutRelativeToParent(
int tag, Callback errorCallback, Callback successCallback) {
mUIImplementation.measureLayoutRelativeToParent(tag, errorCallback, successCallback);
Expand Down

0 comments on commit e42009b

Please sign in to comment.