logoalt Hacker News

tom1337yesterday at 12:04 AM1 replyview on HN

I guess you can just start loading a first batch, add an intersection observer to the last 3 elements (if you have 3 lanes) and then when one of those intersects you simply start fetching the next.


Replies

notpushkinyesterday at 5:49 AM

Hmm, I think we only need to observe the `elements.at(-numberOfLanes)`, as it should be the first to enter the screen anyway.