useInfiniteQuery and Prisma return Same Data when Clicked on Next Page #6737
Answered
by
TkDodo
firaki12345-cmd
asked this question in
Q&A
-
So this is my code for fetching infinite queres from prisma using The Cursor Method, but the problem is when i click on "LOAD MORE BUTTON" , it loads the next data but its the same as the previous one, what am i doing wrong here. My Code Below:
This paramater BELOW gets the Cursor id of the last image,
IF I Do the following below, it gets the next page, but previous data is not there anymore.
PLEASE HELP.. THANKS |
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
Jan 20, 2024
Replies: 1 comment 3 replies
-
You're not using the pageParam that is passed into the queryFn |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
please consult the docs and our examples. You likely don't need
page
in state, but derive it fromgetNextPageParam