From 46e70fbcfd80629e138c41f58802bc47dc9b45f0 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Mon, 2 Jun 2025 14:56:59 -0700 Subject: [PATCH] Rename root -> view in ViewManager parameters (#51755) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51755 this diff renames root -> view in ViewManager parameters changelog: [internal] internal Reviewed By: mlord93 Differential Revision: D75803186 fbshipit-source-id: e70708b5b504c13d617be3becac340d65471e67c --- .../com/facebook/react/uimanager/ViewManager.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java index 1de6be6f87e..2c037b6b4ec 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java @@ -314,7 +314,7 @@ public abstract class ViewManager * *

TODO T7247021: Replace updateExtraData with generic update props mechanism after D2086999 */ - public abstract void updateExtraData(@NonNull T root, Object extraData); + public abstract void updateExtraData(@NonNull T view, Object extraData); /** * Subclasses may use this method to receive events/commands directly from JS through the {@link @@ -323,24 +323,24 @@ public abstract class ViewManager * *

This method is deprecated use {@link #receiveCommand(View, String, ReadableArray)} instead. * - * @param root View instance that should receive the command + * @param view View instance that should receive the command * @param commandId code of the command * @param args optional arguments for the command */ @Deprecated - public void receiveCommand(@NonNull T root, int commandId, @Nullable ReadableArray args) {} + public void receiveCommand(@NonNull T view, int commandId, @Nullable ReadableArray args) {} /** * Subclasses may use this method to receive events/commands directly from JS through the {@link * UIManager}. Good example of such a command would be {@code scrollTo} request with coordinates * for a {@link ReactScrollView} instance. * - * @param root View instance that should receive the command + * @param view View instance that should receive the command * @param commandId code of the command * @param args optional arguments for the command */ - public void receiveCommand(@NonNull T root, String commandId, @Nullable ReadableArray args) { - getOrCreateViewManagerDelegate().receiveCommand(root, commandId, args); + public void receiveCommand(@NonNull T view, String commandId, @Nullable ReadableArray args) { + getOrCreateViewManagerDelegate().receiveCommand(view, commandId, args); } /**