mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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
This commit is contained in:
committed by
Facebook Github Bot
parent
fe5ac2c3f9
commit
acbf9e18ea
@@ -867,9 +867,13 @@ public class UIManagerModule extends ReactContextBaseJavaModule
|
||||
* 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
|
||||
|
||||
Reference in New Issue
Block a user