T
TanStack•2y ago
helpful-purple

all fetched pages get set to the same value as page one using useInfiniteQuery

When hitting back button and returning to a page using useInfiniteQuery, each array/page already fetched will get updated to the result of the first page fetch. This occurs when navigating back using the browser back button.
No description
3 Replies
like-gold
like-gold•2y ago
getNextPageParam is required
helpful-purple
helpful-purpleOP•2y ago
@TkDodo 🔮 what is the proper logic that should be encapsulated in there? my pagination item limit is 12, but haven't been able to get it to work
helpful-purple
helpful-purpleOP•2y ago
I've got it not resetting the pages data now, but when I fetchNextPage it begins fetching from the initial page again
No description

Did you find this page helpful?