T
TanStackโ€ข3mo ago
wise-white

Can I use TanstackDB for a *very simple* news feed app?

Hi, I'm thinking about a simple weekend project. Just one page with a list of news filtered from RSS feeds. I'll have a typical web framework on a backend, putting data in a table called posts, which then would be available through a JSON API endpoint with infinite pagination. To me, this sounds like an opportunity to dip my feet into the local-first world, and I'm seeking advice on whether I have a coherent picture of how different pieces fit together. I don't want React on the frontend. Just a single JS file with an entrypoint invoked in a DOMContentLoaded listener, that would: - Set up an intersection observer to enable on-demand data fetching. I'd prefer to use an off-the-shelf library. The first that came up in search results is, and it allows me to override the request call https://infinite-scroll.com/events#request, so that I would be able to invoke TanstackDB - listen to the page scroll, fetch new posts and append them to the feed container. TanstackDB's role here is to cache things locally and make it blazing fast ๐Ÿ™‚ Does this make sense?
Infinite Scroll
Infinite Scroll ยท Events
Bind event listeners to Infinite Scroll
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?