跳到主要内容

defer

This utility allows you to defer values returned from loaders by passing promises instead of resolved values.

async function loader() {
let product = await getProduct();
let reviews = getProductReviews();
return defer({ product, reviews });
}

See the Deferred Guide for more information.