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
This commit is contained in:
Samuel Susla 2024-11-14 08:10:47 -08:00 committed by Facebook GitHub Bot
parent 849c139a4c
commit e5808f2af6

View File

@ -365,7 +365,8 @@ std::string ShadowNode::getDebugName() const {
std::string ShadowNode::getDebugValue() const {
return "r" + folly::to<std::string>(revision_) + "/sr" +
folly::to<std::string>(state_ ? state_->getRevision() : 0) +
(getSealed() ? "/sealed" : "");
(getSealed() ? "/sealed" : "") +
(getProps()->nativeId.empty() ? "" : "/id=" + getProps()->nativeId);
}
SharedDebugStringConvertibleList ShadowNode::getDebugChildren() const {