How to repeat action if ref is still in view? #642
Unanswered
Arctomachine
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. I am implementing infinite scroll component.
Observer target is placed in the end of this component.
More items are loaded when target gets into view. And normally with newly loaded items target gets pushed out of view, so
inView
turns to false and effect can be triggered again after scroll.Bun on big screen with small items it might remain within viewport even after more items were loaded. In this case
inView
remains true and effect never gets triggered again, infinite scroll stops. What can be changed here to make it work? Preferably not by loading more items at once, not changing their sizes and not doing size calculations.Beta Was this translation helpful? Give feedback.
All reactions