react-simple-infinite-scroll
react-simple-infinite-scroll copied to clipboard
Using intersection observer instead of throttling resize/scroll events
I used this package in a project, liked it and thought it could be made even simpler by removing lodash.throttle
dependency and using IntersectionObserver api.
From my testing I don't think I broke it functionally. One downside is that IntersectionObserver is not implemented on IE, is this a deal-breaker for this PR?
Also, could you provide some more information about the "edge case" in componentDidUpdate? Wouldn't it make sense to avoid loading more information if there is no scroll at all?
I would like to write a test for this situation to make sure how it's supposed to work.
Very interested in this getting merged, i think it evens enables horizontal scrolling :)