-
Notifications
You must be signed in to change notification settings - Fork 49.6k
feat[devtools]: display native tag for host components for Native #32762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huge QOL improvement for debugging Native RN Views!
const title = | ||
'Unique identifier for the corresponding native component. React Native only.'; | ||
|
||
export default function ForgetBadge({nativeTag}: Props): React.Node { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Forget/NativeTag/
<InspectedElementBadges | ||
hocDisplayNames={element.hocDisplayNames} | ||
compiledWithForget={element.compiledWithForget} | ||
nativeTag={inspectedElement.nativeTag} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: destructure with the rest of inspectedElement?
react/packages/react-devtools-shared/src/devtools/views/Components/InspectedElementView.js
Lines 57 to 58 in f134b39
const {owners, rendererPackageName, rendererVersion, rootType, source} = | |
inspectedElement; |
b080b67
to
3db5fa0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this!
<details> <summary>React upstream changes</summary> - facebook/react#32821 - facebook/react#32819 - facebook/react#32816 - facebook/react#32815 - facebook/react#32812 - facebook/react#32762 - facebook/react#32808 - facebook/react#32807 </details>
[diff facebook/react@040f8286...33661467](facebook/react@040f828...3366146) <details> <summary>React upstream changes</summary> - facebook/react#32823 - facebook/react#32822 - facebook/react#32825 - facebook/react#32821 - facebook/react#32819 - facebook/react#32816 - facebook/react#32815 - facebook/react#32812 - facebook/react#32762 - facebook/react#32808 - facebook/react#32807 </details>
[diff facebook/react@040f8286...33661467](facebook/react@040f828...3366146) <details> <summary>React upstream changes</summary> - facebook/react#32823 - facebook/react#32822 - facebook/react#32825 - facebook/react#32821 - facebook/react#32819 - facebook/react#32816 - facebook/react#32815 - facebook/react#32812 - facebook/react#32762 - facebook/react#32808 - facebook/react#32807 </details>
Native only. Displays the native tag for Native Host components inside a badge, when user inspects the component.
Only displaying will be supported for now, because in order to get native tags indexable, they should be part of the bridge operations, which is technically a breaking change that requires significantly more time investment.
The text will only be shown when user hovers over the badge.
