loading...

re: React Infinite Scroll Tutorial: With and Without a Library VIEW POST

FULL DISCUSSION
 

Thanks for this article. For the version without any library it would be nice to use the intersection observer rather that the onScroll event. That would be much more efficient

 

Thanks for the suggestion. Do you have any reference for that?

 

developer.mozilla.org/en-US/docs/W...

Not supported in IE11 though, if that is of any concern

Yeah, or write a tiny abstraction on top of the code that is already there, that is "probably" better.

 

here is an article in Vanilla JS about implementing a back to top button with Observers
it is pretty similar to fetching new scrollable items
m.signalvnoise.com/how-to-back-to-...

Code of Conduct Report abuse