Mainak
Mainak
TTCTheo's Typesafe Cult
Created by Mainak on 9/15/2024 in #questions
useQuery vs useSuspenseQuery
I'm having a hard time understanding in what's the main difference between useQuery and useSuspenseQuery? For example I prefetch one endpoint at page.tsx, considering that prefetch will prefill the cache then what will happen if I call useQuery instead on useSuspenseQuery? Also if a component is using useSuspenseQuery for some data, then how to invalidate that and fetch new data from some other component? With useQuery we do have invalidate function that I can call!
12 replies
TTCTheo's Typesafe Cult
Created by Mainak on 8/23/2024 in #questions
Update locale or query param doesn't trigger the loading.tsx file with useSuspenseQuery
No description
1 replies