react-simple-infinite-scroll icon indicating copy to clipboard operation
react-simple-infinite-scroll copied to clipboard

Using intersection observer instead of throttling resize/scroll events

Open tarnas14 opened this issue 5 years ago • 1 comments

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.

tarnas14 avatar Oct 22 '19 18:10 tarnas14

Very interested in this getting merged, i think it evens enables horizontal scrolling :)

KyorCode avatar Nov 09 '19 21:11 KyorCode