usqInfiniteQuery hook query key not being set #3467
Unanswered
cubecleveland
asked this question in
Q&A
Replies: 1 comment
-
with regards to the query key, there is no difference between Please provide a codesandbox reproduction if that's not the case. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Helo, im using the Infinite query hook to fetch scrolling info from a backend..
My code look like this
useInfiniteQuery(
[
id,
"search",
queryFilter
],
fetch,
{
getNextPageParam: (lastPage, pages) => {
return pages.length < lastPage.last_page
? lastPage.last_page
: undefined;
},
}
);
My hope is that queryFilter will in term alwasy cache different queries based on the value, but it seems like the query keys bounce and the queries are being overwritten .
the same exact method works flawlessly when using useQuery to fetch regular queries.....
Are we missing something, is there any other way to ensure the perisstnet of the query keys using useInifinteQuery ?
Beta Was this translation helpful? Give feedback.
All reactions