Bada
Bada's Coding

Follow

Bada's Coding

Follow

(React Query v3) useInfiniteQuery

Bada's photo
Bada
·Jan 3, 2023·

1 min read

We can use 'useQuery' to make infinite scroll, but this method makes it easier.

Prefetching is used. If you check the devTool, you will notice data of the next page is already fetched.

Below is an example. Please don't forget to check the comments.

 
Share this