Skip to content
Discussion options

You must be logged in to vote

The idea is more something like:

const useInfiniteTodos = {
  const queryInfo = useInfiniteQuery(...)
  return {
    ...queryInfo,
    data: {
      ...queryInfo.data,
      pages: queryInfo.data?.pages.flat()
    }
  }
}

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@crieggalder
Comment options

@tannerlinsley
Comment options

@crieggalder
Comment options

Comment options

You must be logged in to vote
2 replies
@crieggalder
Comment options

@TkDodo
Comment options

Answer selected by crieggalder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
4 participants