Build a scrollable list that loads more items as you reach the bottom — the "infinite scroll" pattern behind feeds and search results. Instead of doing scroll-position math, you'll watch a sentinel element at the end of the list with an IntersectionObserver and load the next page when it comes into view.
The starter App.tsx renders the first 10 items inside a fixed-height scroll box, with an empty footer holding the sentinel. Make it load more:
items with useState (starting at the first 10) and a loading boolean. Derive done when all 50 are shown.useEffect, create an IntersectionObserver whose root is the scroll container (listRef), and observe the sentinel. When it intersects, load the next page.ALL.slice(0, prev.length + PAGE)) after a ~400ms setTimeout that simulates a fetch. Show Loading… while it's in flight.No more items and disconnect the observer.root is listRef, so the watched element has to be a descendant of it — that's why the sentinel sits in the footer at the end of the list.io.disconnect() in the effect cleanup so the callback stops firing against a sentinel that will never move again.styles.css; focus on the observer and the paging state.