Skip to content

Commit

Permalink
Deprecate method UIManagerModule.resolveRootTagFromReactTag
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mdvacca authored and facebook-github-bot committed Mar 6, 2020
1 parent fe5ac2c commit acbf9e1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -867,9 +867,13 @@ public void removeUIManagerListener(UIManagerModuleListener listener) {
* Given a reactTag from a component, find its root node tag, if possible. Otherwise, this will
* return 0. If the reactTag belongs to a root node, this will return the same reactTag.
*
* @deprecated this method is not going to be supported in the near future, use {@link
* ViewUtil#isRootTag(int)} to verify if a react Tag is a root or not
* <p>TODO: T63569137 Delete the method UIManagerModule.resolveRootTagFromReactTag
* @param reactTag the component tag
* @return the rootTag
*/
@Deprecated
public int resolveRootTagFromReactTag(int reactTag) {
return ViewUtil.isRootTag(reactTag)
? reactTag
Expand Down

0 comments on commit acbf9e1

Please sign in to comment.