Sign in
Log inSign up
Lucas ROURET

5 likes

·

6.1K reads

2 comments

Dhruvil S Shah
Dhruvil S Shah
Aug 11, 2024

TBH, I still like the react-query way. Also the advantage of mutations, I can't ignore it. tanstack has made API requests so simple

·
·1 reply
Lucas ROURET
Lucas ROURET
Author
·Aug 11, 2024

I'm not saying to stop using React Query, but to replace useQuery with useSuspenseQuery and React's Suspense.

·
Reuel Teodoro
Reuel Teodoro
Aug 11, 2024

Wait I never heard of useSuspenseQuery? i tried looking into the docs and it just the says its same as useQuery? please explain? also does the hook always have to be inside the a component of a Suspense component? Because Im working on an codebase that has a Context Provider e.g a UserProvider and we export the 'data, isLoading, refetch' and use that everywhere in our code.

·