useAsyncValue

useAsyncValue

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

useAsyncValue(): unknown
Docs and examples CC 4.0