More Data-Fetching Challenges
By now, you must be familiar with how React Query enables you to fetch data with the help of useQuery
. You even learned how to deal with some common challenges that the server state brings you.
In this chapter, you will learn how to deal with some more server state challenges. You will understand how you can perform parallel queries and, in the process, get to know a variant of your useQuery
hook that makes it easier, called useQueries
.
You will again leverage QueryClient
to deal with data prefetching, query invalidation, and query cancelation. You will even learn how to customize the methods you use to do these things by using some filters.
Pagination and infinite lists are common UI patterns, and you will leverage your knowledge to build them while learning more about useQuery
and even meeting another variant called useInfiniteQuery
.
By the end of this chapter, you will use the Devtools once again to look inside your queries and enhance your...