useInifiniteQuery()
for infinite scrolling
#178
Labels
💬 discussion
topic that requires further discussion
⚡️ enhancement
improvement over an existing feature
I'm trying to figure out a flexible API for
useInfiniteQuery()
. Goals are:Currently, I have a very simple version that lacks many features:
useInfiniteQuery()
(click to expand source code)It's lacking:
loadMore()
that works with infinite scrollingBy allowing a low level
merge
function, we can fully control the format of the data and we can end up with just a collection that we iterate on the client. We needinitialPage
to make types inferrable inmerge
since it's both the parameter and return type. Here is full example of it's usage with scroll:You can run this example locally with
pnpm run play
and visiting http://localhost:5173/cat-factsI'm looking for feedback of existing needs in terms of caching and data access to implement a more feature-complete
useInfiniteQuery()
The text was updated successfully, but these errors were encountered: