From e5808f2af6c86b066ba0943a05dd4ae8184b06d4 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Thu, 14 Nov 2024 08:10:47 -0800 Subject: [PATCH] add nativeId to shadow node logs (#47594) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47594 changelog: [internal] helpful for debugging. Reviewed By: christophpurrer Differential Revision: D65895429 fbshipit-source-id: 51f361f00b070c2374232a375af1b17abb341a97 --- .../ReactCommon/react/renderer/core/ShadowNode.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp b/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp index 814df904eef..62827028223 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp +++ b/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp @@ -365,7 +365,8 @@ std::string ShadowNode::getDebugName() const { std::string ShadowNode::getDebugValue() const { return "r" + folly::to(revision_) + "/sr" + folly::to(state_ ? state_->getRevision() : 0) + - (getSealed() ? "/sealed" : ""); + (getSealed() ? "/sealed" : "") + + (getProps()->nativeId.empty() ? "" : "/id=" + getProps()->nativeId); } SharedDebugStringConvertibleList ShadowNode::getDebugChildren() const {