From a8639494136f3a1427d119fe09fd090ef3a1d714 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Mon, 22 Jul 2019 15:35:19 -0700 Subject: [PATCH] Deprecate UIManagerModule.replaceExistingNonRootView Summary: The method UIManagerModule.replaceExistingNonRootView 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: D16420685 fbshipit-source-id: c534e2ee6371698638751f1482bb619db1569733 --- React/Modules/RCTUIManager.m | 1 + .../java/com/facebook/react/uimanager/UIManagerModule.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/React/Modules/RCTUIManager.m b/React/Modules/RCTUIManager.m index 1d7ac52a941..dff752077e9 100644 --- a/React/Modules/RCTUIManager.m +++ b/React/Modules/RCTUIManager.m @@ -808,6 +808,7 @@ RCT_EXPORT_METHOD(removeRootView:(nonnull NSNumber *)rootReactTag) RCT_EXPORT_METHOD(replaceExistingNonRootView:(nonnull NSNumber *)reactTag withView:(nonnull NSNumber *)newReactTag) { + RCTLogWarn(@"RCTUIManager.replaceExistingNonRootView method is deprecated and it will not be implemented in newer versions of RN (Fabric) - T47686450"); RCTShadowView *shadowView = _shadowViewRegistry[reactTag]; RCTAssert(shadowView != nil, @"shadowView (for ID %@) not found", reactTag); 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 478dc2b4070..c13b9e26ed3 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java @@ -544,8 +544,11 @@ public class UIManagerModule extends ReactContextBaseJavaModule * Replaces the View specified by oldTag with the View specified by newTag within oldTag's parent. * This resolves to a simple {@link #manageChildren} call, but React doesn't have enough info in * JS to formulate it itself. + * + * @deprecated This method will not be available in Fabric UIManager. */ @ReactMethod + @Deprecated public void replaceExistingNonRootView(int oldTag, int newTag) { mUIImplementation.replaceExistingNonRootView(oldTag, newTag); }