返回最近的<Await>祖先组件的解析数据。
function ProductVariants() { const variants = useAsyncValue(); return <div>{/* ... */}</div>; } // Await creates the context for the value <Await resolve={somePromiseForProductVariants}> <ProductVariants /> </Await>;
最后更新于9个月前
这有帮助吗?