-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Adds displayName to EventComponent and EventTarget #15268
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.
Any reason we don’t do it the way we normally do? By adding to getComponentName. Tools like DevTools can vendor that code.
@gaearon I could add support for this in |
React: size: 0.0%, gzip: -0.0% ReactDOM: size: 🔺+0.2%, gzip: 🔺+0.2% Details of bundled changes.Comparing: 6a1e6b2...3cc723a react
react-dom
react-art
react-native-renderer
react-test-renderer
react-reconciler
Generated by 🚫 dangerJS |
The problem with this, as described in #15267, is that there isn't sufficient information for I would normally have suggested we maybe add an enum or something to the Technically we don't need the |
Yep, as Brian said, the issue here is third party usage. I've updated the |
I can confirm after testing locally that we want to keep the |
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.
Would be nice to have test coverage for the REACT_EVENT_TARGET_TYPE
type (falling back to displayName
etc.)
Overall this seems okay to me, given the goals. Couple of minor suggestions but accepting to unblock later.
Follow up to #15267. Adds the
displayName
field to EventComponent and EventTarget objects to provide this information from components using the experimental event API. This also adds support for the event API components showing ingetComponentName
.