Skip to content

Commit acbf9e1

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Deprecate method UIManagerModule.resolveRootTagFromReactTag
Summary: In this diff I'm doing the following: - Deprecating the method UIManagerModule.resolveRootTagFromReactTag - Removing the callsites to the method UIManagerModule.resolveRootTagFromReactTag - Refactoring the callsites in order to keep the same behavior for rootTags - Throwing an exception if this method was being called with a non rootTag - Controlling this change of behavior with a MC This is possible because long time ago we refactored all the callsites to this method to ensure we only use rootTag. I'm making extra steps to make sure this deprecation is safe and we don't break production if this method was being called with a non Root Tag. changelog: [Android][Deprecated] We are deprecating the method UIManagerModule.resolveRootTagFromReactTag, this will not be supported in the next version of RN Reviewed By: fkgozali Differential Revision: D20309166 fbshipit-source-id: 8b89ba889313ae03ed543f402b68f1bb4064ca68
1 parent fe5ac2c commit acbf9e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -867,9 +867,13 @@ public void removeUIManagerListener(UIManagerModuleListener listener) {
867867
* Given a reactTag from a component, find its root node tag, if possible. Otherwise, this will
868868
* return 0. If the reactTag belongs to a root node, this will return the same reactTag.
869869
*
870+
* @deprecated this method is not going to be supported in the near future, use {@link
871+
* ViewUtil#isRootTag(int)} to verify if a react Tag is a root or not
872+
* <p>TODO: T63569137 Delete the method UIManagerModule.resolveRootTagFromReactTag
870873
* @param reactTag the component tag
871874
* @return the rootTag
872875
*/
876+
@Deprecated
873877
public int resolveRootTagFromReactTag(int reactTag) {
874878
return ViewUtil.isRootTag(reactTag)
875879
? reactTag

0 commit comments

Comments
 (0)