From 2992518b2e1eec356818fcb250ecd410b5967066 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Mon, 22 Jul 2019 15:35:19 -0700 Subject: [PATCH] Deprecate UIManagerModule.removeSubviewsFromContainerWithID Summary: The method UIManagerModule.removeSubviewsFromContainerWithID will not be part of fabric. This diff deprecates it to avoid future usage before the migration. This can not be removed, as it is currently used from React-VR Reviewed By: shergin Differential Revision: D16420687 fbshipit-source-id: a06810cabb434e35e5a371444114db2633a35a29 --- React/Modules/RCTUIManager.m | 1 + .../main/java/com/facebook/react/uimanager/UIManagerModule.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/React/Modules/RCTUIManager.m b/React/Modules/RCTUIManager.m index dff752077e9..e41801b35dd 100644 --- a/React/Modules/RCTUIManager.m +++ b/React/Modules/RCTUIManager.m @@ -670,6 +670,7 @@ static NSDictionary *deviceOrientationEventBody(UIDeviceOrientation orientation) */ RCT_EXPORT_METHOD(removeSubviewsFromContainerWithID:(nonnull NSNumber *)containerID) { + RCTLogWarn(@"RCTUIManager.removeSubviewsFromContainerWithID method is deprecated and it will not be implemented in newer versions of RN (Fabric) - T47686450"); id container = _shadowViewRegistry[containerID]; RCTAssert(container != nil, @"container view (for ID %@) not found", containerID); diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java index c13b9e26ed3..3b703e34640 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java @@ -558,8 +558,10 @@ public class UIManagerModule extends ReactContextBaseJavaModule * receipt. TODO: The method name is incorrect and will be renamed, #6033872 * * @param containerTag the tag of the container for which the subviews must be removed + * @deprecated This method will not be available in Fabric UIManager. */ @ReactMethod + @Deprecated public void removeSubviewsFromContainerWithID(int containerTag) { mUIImplementation.removeSubviewsFromContainerWithID(containerTag); }