-
Notifications
You must be signed in to change notification settings - Fork 880
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
[react] Add React.HTMLAttributes to component props #2123
Conversation
🦋 Changeset detectedLatest commit: 24bcb31 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📊 Tachometer Benchmark ResultsSummarynop-update
render
update
update-reflect
Resultslit-element-list
render
update
update-reflect
lit-html-kitchen-sink
render
update
nop-update
lit-html-repeat
render
update
lit-html-template-heavy
render
update
reactive-element-list
render
update
update-reflect
|
@@ -174,7 +178,7 @@ export const createComponent = <I extends HTMLElement, E>( | |||
setProperty( | |||
this._element, | |||
prop, | |||
this.props[prop as keyof ComponentProps], | |||
this.props[prop as Exclude<keyof ComponentProps, symbol>], |
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.
What is this doing?
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.
I was getting an error that symbol couldn't be used in an index type. I scanned, but couldn't figure which part of React.HTMLAttributes was including a symbol key, so I just... excluded it
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.
I removed it and don't see the error now 🤷
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.
LGTM
Fixes #2026
The React.HTMLAttributes type contains the built-in properties and event handlers and such, including the
onFoo
synthetic event handlers.