Intersection Observer API to refactor Infinite scroll Discussion
Discussion for
Intersection Observer API to refactor Infinite scroll
Hi, Chris!
Recently found gem from basecamp “geared_pagination”. Can you make a suggestion how to integrate it instead of pagy?
Looks like if scroll too fast the same data is fetched twice, even in the video you can see the same. So basically we should still use this.loading to prevent fetching same data multiple times.
This works great! The only thing I'd add is that if you want to hide the pagination itself, don't use "display: none" because the observer API won't work.
You can use "opacity:0" or some other way of hiding the div, and it'll work!