Skip to content
Discussion options

You must be logged in to vote

in v5, getNextPageParam and getPreviousPageParam will get access to all "pageParams", similar to how it gets access to all pages. So, you can derive the info from that. Until then, what @louis-young said is the best option: return that info with your data from the QueryFunction.

https://tanstack.com/query/v5/docs/react/reference/useInfiniteQuery

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
5 replies
@MaddoScientisto
Comment options

@louis-young
Comment options

@MaddoScientisto
Comment options

@louis-young
Comment options

@MaddoScientisto
Comment options

Comment options

You must be logged in to vote
1 reply
@MaddoScientisto
Comment options

Answer selected by louis-young
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