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

useEvent: Small tweaks and changes #18328

Merged
merged 1 commit into from Mar 17, 2020

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Mar 17, 2020

This PR makes a few adjustments and tweaks to the current useEvent logic within the modern event system. Namely:

  • useEvent uses the the browser default for passive as per the internal document, rather than passive being true by default.
  • Fixed an issue in the error message where there was missing newlines
  • Added another test to increase coverage when using useEvent together with standard on* events.

@trueadm trueadm requested a review from gaearon March 17, 2020 14:52
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Mar 17, 2020
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit fa318b5:

Sandbox Source
thirsty-architecture-jcz3v Configuration

@sizebot
Copy link

sizebot commented Mar 17, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against fa318b5

@sizebot
Copy link

sizebot commented Mar 17, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against fa318b5

@trueadm trueadm merged commit 3a0076e into facebook:master Mar 17, 2020
@trueadm trueadm deleted the not-passive-by-default branch March 17, 2020 15:32
sthagen added a commit to sthagen/facebook-react that referenced this pull request Mar 17, 2020
useEvent: Small tweaks and changes (facebook#18328)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants