rehooks / window-scroll-position

React hook for Window scroll position
MIT License
82 stars 13 forks source link

Always try to use passive event listener #2

Closed Andarist closed 6 years ago

Andarist commented 6 years ago

From what I understand passive ensures the browser that event.preventDefault wont ever be called by the listener. As the consumer of this package has no control over the listener & event there is no point in making this configurable, you know that preventDefault won't get called and thus you should always use passive listener is possible.

prichodko commented 6 years ago

You are right, thanks for pointing this out.

Could you delete it from the README as well?

Andarist commented 6 years ago

done

prichodko commented 6 years ago

Thanks!