I have a page with a GraphQL query that fetches over a thousand nodes.
I need to have most of the data available to do client-side filtering, but I'd like to avoid initially rendering the whole thing as one gigantic page.
Are there any examples/documentation of sites that use an infinite-scroll-type setup for react components that are dynamically generated from a Gatsby GraphQL query?
Looks like I was basically on the right track with using state to limit the number of items shown. Thanks!
Loading metadata for all items and then filtering in the client's browser is slow if you have many items. It's more efficient if you only load the items you need. I made a more efficient implementation here: https://github.com/baobabKoodaa/gatsby-starter-infinite-scroll
Most helpful comment
The front page of https://gatsbygram.gatsbyjs.org/ does that https://github.com/gatsbyjs/gatsby/blob/master/examples/gatsbygram/src/pages/index.js