Consider marking event handler as 'passive' to make the page more responsive
See original GitHub issueHi:
I was using Chrome version: Version 55.0.2883.75 beta (64-bit)
with react-waypoint and noticed the following warning message when I scroll with the mouse wheel:
I wonder if this warning would go away if we add the wheel
event listener with the { passive: true }
flag in react-waypoint
?
Issue Analytics
- State:
- Created 7 years ago
- Comments:14
Top Results From Across the Web
Consider marking event handler as 'passive' to make the page ...
Passive event listeners are a new feature in the DOM spec that enable developers to opt-in to better scroll performance by eliminating the...
Read more >[Violation] Added non-passive event listener to a ... - GitHub
... Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.
Read more >Passive event listeners - Medium
Consider marking event handler as 'passive' to make the page more responsive. you should use the passive option in .
Read more >Passive event warnings [63211698] - Visible to Public
Consider marking event handler as 'passive' to make the page more responsive. Well I considered it and determined that I can't.
Read more >Consider marking event handler as 'passive' to make the page ...
jQuery : Consider marking event handler as 'passive' to make the page more responsive [ Beautify Your Computer ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Close, but not quite. The idea behind consolidated-events is to combine multiple event handlers for the same event type on the same node into a single event handler. So, if you add multiple scroll events to the same node, it should only add one. It will not consolidate different types of event handlers (e.g. scroll and resize) into a single one. That is not possible.
Secondarily, it allows you to use options like the
passive
option without having to worry about browser compatibility.Thanks for the clarifications @lencioni , really learnt a lot today.
For the original issue with
wheel
event, I’ve posted a stackoverflow question to follow it up separately. Perhaps we can get some answers from there from the community. Thanks again for all the follow ups.