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
This commit is contained in:
David Vacca
2025-06-02 14:56:59 -07:00
committed by Facebook GitHub Bot
parent 5f0d508390
commit 46e70fbcfd
@@ -314,7 +314,7 @@ public abstract class ViewManager<T extends View, C extends ReactShadowNode>
*
* <p>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<T extends View, C extends ReactShadowNode>
*
* <p>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);
}
/**