Hi Folks!!! How are you? Fine? How have you been?
As I promissed on the first article about react query, where I talk about this state management ...
For further actions, you may consider blocking this person and/or reporting abuse
is a great article,
just one thing missing:
const { data, error, fetchNextPage, hasNextPage, isFetching, isLoading } =
useInfiniteQuery({
(...)
initialPageParam: 0,
getNextPageParam: (lastPage, allPages) => {
return lastPage.length ? allPages.length + 1 : undefined;
},
});
initialPageParam is missing
Great article. In React Query v5 you can use maxPages prop with infinite queries to limit the number of stored and refetched pages
Great article @kevin-uehara !!! I really enjoyed it, well structured and really insightful. 👌
I will share it if it's ok with you.
Nice article. I want to implement infinite scroll in a project I'm working on but I've got one question. Why did you set the ref on each element in the list you're rendering and not just place it a div that's at the bottom of the list?