useAsyncValue

useAsyncValue

返回最近 <Await> 祖级组件的解析数据。

¥Returns the resolved data from the closest <Await> ancestor component.

function SomeDescendant() {
  const value = useAsyncValue();
  // ...
}
<Await resolve={somePromise}>
  <SomeDescendant />
</Await>

其他资源

¥Additional Resources

指南

¥Guides

API

Remix v2.17 中文网 - 粤ICP备13048890号