TanStackT
TanStack2y ago
2 replies
then-purple

When to use `useQuery` vs `useSuspenseQuery` with NextJS?

I looked trough the documents trying to find some details about the differences between
useQuery
and useSuspenseQuery hooks, but other than the fact that the
status
is always success and there's no error obbject in the suspense version of the hook, I don't understand the main differences between the two.

Can anyone explain to me:

- Where and When do I want to use the suspense version of the hook?
- Is it okay to use the "normal" non-suspense version of the hook?
Was this page helpful?