stutrek / scrollmonitor

A simple and fast API to monitor elements as you scroll
MIT License
3.3k stars 243 forks source link

Removing unnecessary call #58

Closed weotch closed 7 years ago

weotch commented 7 years ago

DOMListener() calls setStateFromDOM() which calls setState() which calls updateAndTriggerWatchers(). Since none of these functions can exit early, updateAndTriggerWatchers() will always be called by virtue of the setStateFromDOM() call and thus doesn't need to be explicitly invoked.

stutrek commented 7 years ago

👍

stutrek commented 7 years ago

If you were wondering, that alert is there to debug IE8.