RJR
Convex Community4y ago
27 replies
RJ

Windowed Infinite Scroll

I was curious to know whether anyone has thoughts on “windowed” pagination—I’m not sure what people call this, but I’ll explain what I mean.

In most implementations of “infinite scroll” that I’ve seen, new items are loaded and appended to the end of a list indefinitely, but old items are never removed. This means that scrolling is not actually “infinite” in the sense that eventually, you load too many items onto the DOM and your page gets slow!

I would like the ability to “unload” items at the beginning of the list once the list reaches a certain limit, and then to reload those things if a user scrolls back up (or in the opposite direction).

I’m curious to know if this is possible to achieve right now, and if so, how!
Was this page helpful?