From 4cf70306b95f1f45b95f60ce67000663a1c5d273 Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Mon, 25 Feb 2019 17:20:41 -0800 Subject: [PATCH] Use cached react tag versus id on view Summary: Due to the way (initial) surface implementation plays with ReactRootView (RRV), the react tag from the UIManagerModule is now set on the surface container view rather than on RRV as it was historically done. RRV still caches the react tag but just doesn't use it as an id on the view so `RRV.getViewId()` no longer equals `RRV.getReactTag()`. Reviewed By: mdvacca Differential Revision: D14110104 fbshipit-source-id: 6dbcc41c85fd7a6c32c7250f68f4a84bed4e075a --- .../main/java/com/facebook/react/ReactInstanceManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java b/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java index d791cfbe1e6..b88326e6cc8 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java @@ -1075,10 +1075,10 @@ public class ReactInstanceManager { UiThreadUtil.assertOnUiThread(); if (rootView.getUIManagerType() == FABRIC) { catalystInstance.getJSModule(ReactFabric.class) - .unmountComponentAtNode(rootView.getId()); + .unmountComponentAtNode(rootView.getRootViewTag()); } else { catalystInstance.getJSModule(AppRegistry.class) - .unmountApplicationComponentAtRootTag(rootView.getId()); + .unmountApplicationComponentAtRootTag(rootView.getRootViewTag()); } }