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

Trying to understand scrollCheck #163

Open
paulincai opened this issue Aug 2, 2019 · 2 comments
Open

Trying to understand scrollCheck #163

paulincai opened this issue Aug 2, 2019 · 2 comments

Comments

@paulincai
Copy link

Hi,
I'd really appreciate if someone cares to explain what is the use case for 'scrollCheck'.
I started to use this library just an hour ago and I do an infinite scroll and everything works perfect, as aspected before turning scrollCheck on.
Thank a bunch,
Paul

@thierry-prost
Copy link

On a similar note, I was wondering what role scroll check and resize check play when you can accomplish the desired effect with intervalCheck alone?

@thierry-prost
Copy link

thierry-prost commented Aug 12, 2019

@paulincai from what I can make out from the code, the scrollCheck is a flag that will or will not append an event listener for, you guessed it, check for scroll events.

You can find the relevant lines here:
https://github.com/joshwnj/react-visibility-sensor/blob/b32ab6336c036f6d02b681d4cef65a0cecd38994/visibility-sensor.js#L163-L170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants