civiccc / civiccc/react-waypoint
Remove `passive` event listener flag?
- Dominant language
- JavaScript
- Stars
- 4k
- Forks
- 206
- PR merge metrics
- No merged PRs in 30d
Description
I was reading up on [`EventTarget.addEventListener`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Improving_scrolling_performance_with_passive_listeners) and came across this section:
> Setting passive isn't important for the basic scroll event, as it cannot be canceled, so its listener can't block page rendering anyway.
We introduced passive listeners in 3ad940e, but I think that has no effect on performance and we can remove it. We do use it for both the `scroll` event and the `resize` event. I think it might have effect for `resize`, but performance isn't really important for that event (people don't normally resize their browsers).
@lencioni I'm interested to get your input here.
Contributor guide
Assessment
This issue has not been assessed yet.