From cfb91830a6ece42dbbf8a5e29eb18847909397e3 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Tue, 24 Feb 2026 09:50:53 -0800 Subject: [PATCH] Fix minor issues in UIManager (#55686) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/55686 changelog: [internal] Small cleanup in UIManager Reviewed By: lenaic Differential Revision: D90330663 fbshipit-source-id: 0685725bb9d1f4d7d4c2aa5a76666ef0e01d9d21 --- .../ReactCommon/react/renderer/uimanager/UIManager.cpp | 9 +++------ .../ReactCommon/react/renderer/uimanager/UIManager.h | 6 +++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.cpp b/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.cpp index 1239c8a73f7..66c28d29829 100644 --- a/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.cpp +++ b/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.cpp @@ -469,7 +469,7 @@ void UIManager::setNativeProps_DEPRECATED( ->getProps(), RawProps(rawProps)); - return oldShadowNode.clone({/* .props = */ .props = props}); + return oldShadowNode.clone({.props = props}); }); return std::static_pointer_cast(rootNode); @@ -493,15 +493,12 @@ void UIManager::configureNextLayoutAnimation( const jsi::Value& failureCallback) const { if (animationDelegate_ != nullptr) { animationDelegate_->uiManagerDidConfigureNextLayoutAnimation( - runtime, - config, - std::move(successCallback), - std::move(failureCallback)); + runtime, config, successCallback, failureCallback); } } static std::shared_ptr findShadowNodeByTagRecursively( - std::shared_ptr parentShadowNode, + const std::shared_ptr& parentShadowNode, Tag tag) { if (parentShadowNode->getTag() == tag) { return parentShadowNode; diff --git a/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.h b/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.h index bb287fe40f2..73dff179205 100644 --- a/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.h +++ b/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.h @@ -68,7 +68,7 @@ class UIManager final : public ShadowTreeDelegate { std::weak_ptr unstable_getAnimationBackend(); /** - * Execute stopSurface on any UIMAnagerAnimationDelegate. + * Execute stopSurface on any UIManagerAnimationDelegate. */ void stopSurfaceForAnimationDelegate(SurfaceId surfaceId) const; @@ -79,9 +79,9 @@ class UIManager final : public ShadowTreeDelegate { void synchronouslyUpdateViewOnUIThread(Tag tag, const folly::dynamic &props); /* - * Provides access to a UIManagerBindging. + * Provides access to a UIManagerBinding. * The `callback` methods will not be called if the internal pointer to - * `UIManagerBindging` is `nullptr`. + * `UIManagerBinding` is `nullptr`. * The callback is called synchronously on the same thread. */ void visitBinding(