TanStackT
TanStack3y ago
2 replies
clean-aquamarine

What is the best way to fetch data which is dependent on results from an infiniteQuery?

Let's say I have a personal database of movies which I've seen which populates on the page via an infinite scroll mechanism like the simple example here: https://tanstack.com/query/v4/docs/react/guides/infinite-queries. Whenever the page loads a new batch of movies via the infiniteQuery I want to query IMDB for information on those new movies while still maintaining my old IMDB queries so they can refetch as needed. Is there a good way to do this?
Was this page helpful?