Skip to main content

useAsyncValue

还没翻译译自英文(reactrouter.com)本页 10 段都还没译

useAsyncValue

Framework Data

Summary

Reference Documentation ↗

Returns the resolved promise value from the closest <Await>.

function SomeDescendant() {
  const value = useAsyncValue();
  // ...
}

// somewhere in your app
<Await resolve={somePromise}>
  <SomeDescendant />
</Await>;

Signature

function useAsyncValue(): unknown

Returns

The resolved value from the nearest Await component

Traducción © 2026 fanyi.dev · Original © 2026 React Training LLC, Remix Software Inc., Shopify Inc. (MIT)