Skip to content

Commit e42009b

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Deprecate UIManager.measureLayoutRelativeToParent
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
1 parent 8131b7b commit e42009b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

React/Modules/RCTUIManager.m

+1
Original file line numberDiff line numberDiff line change
@@ -1398,6 +1398,7 @@ static void RCTMeasureLayout(RCTShadowView *view,
13981398
errorCallback:(__unused RCTResponseSenderBlock)errorCallback
13991399
callback:(RCTResponseSenderBlock)callback)
14001400
{
1401+
RCTLogWarn(@"RCTUIManager.measureLayoutRelativeToParent method is deprecated and it will not be implemented in newer versions of RN (Fabric) - T47686450");
14011402
RCTShadowView *shadowView = _shadowViewRegistry[reactTag];
14021403
RCTMeasureLayout(shadowView, shadowView.reactSuperview, callback);
14031404
}

ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java

+3
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,11 @@ public void measureLayout(
607607
* <p>NB: Unlike {@link #measure}, this will measure relative to the view layout, not the visible
608608
* window which can cause unexpected results when measuring relative to things like ScrollViews
609609
* that can have offset content on the screen.
610+
*
611+
* @deprecated This method will not be part of Fabric.
610612
*/
611613
@ReactMethod
614+
@Deprecated
612615
public void measureLayoutRelativeToParent(
613616
int tag, Callback errorCallback, Callback successCallback) {
614617
mUIImplementation.measureLayoutRelativeToParent(tag, errorCallback, successCallback);

0 commit comments

Comments
 (0)