React · Middle · Question 28 of 75

How does React 19's use(promise) differ from regular hooks?

Explanation

use reads the value of a promise or context. Until the promise resolves, the nearest <Suspense> kicks in, and an error goes to the error boundary. Don't create the promise during a client component's render - it'll be new every time; pass it from a Server Component or a caching library.

Further reading

Problem with a question

React · Middle · question 28

Test yourself

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

Take this quiz