Skip to content
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

docs: Switch TS Events docs to use .currentTarget #1241

Merged
merged 1 commit into from
Feb 18, 2025
Merged

Conversation

rschristian
Copy link
Member

Something that's popped up a few times in the last few days, we should generally point users to .currentTarget now that our types will infer the correct element automatically when possible. Impossible to avoid casting with .target which is a bit cumbersome.

Not sure if we should explicitly state why .currentTarget should be preferred over .target, or at least, I'm not sure how to phrase that beyond "React does weird things with their events".

@rschristian rschristian merged commit ea81e1d into master Feb 18, 2025
5 checks passed
@rschristian rschristian deleted the docs/ts-events branch February 18, 2025 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants