State Management · Senior · Question 43 of 75

How do you stream slow, non-critical data from a React Router loader?

Explanation

Await critical data, return the rest as a promise: return { product: await getProduct(), reviews: getReviews() }. The page renders immediately and reviews stream in.

Further reading

Problem with a question

State Management · Senior · question 43

Test yourself

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

Take this quiz