React · Senior · Question 39 of 75

How does useSuspenseQuery differ from useQuery?

Explanation

The component suspends until data arrives, so there's no need for isPending checks inside, and data isn't undefined. Errors propagate to the error boundary (reset via QueryErrorResetBoundary). Caveats: the enabled option isn't available, and sequential suspensions create request waterfalls.

Further reading

Problem with a question

React · Senior · question 39

Test yourself

Take the React · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz