Skip to content

delete some page in useInfiniteQuery #3101

Answered by TkDodo
thanhlmm asked this question in Q&A
Discussion options

You must be logged in to vote

Maybe we can set page 1 at placeholder then delete call remove?

that would work, but what I would do is more along the lines of:

  • call refetch or invalidateQueries with the refetchPage option and only refetch the first page
  • remove all pages but the first one after that with queryClient.setQueryData

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@TkDodo
Comment options

@thanhlmm
Comment options

@TkDodo
Comment options

@FloareDor
Comment options

@TkDodo
Comment options

Answer selected by thanhlmm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants