main
Branches
main (2.15.1)dev
Versions
2.15.11.19.3v0.21.0
React Router v7 has been released. View the docs
useAsyncValue

useAsyncValue

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

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

Additional Resources

Guides

API

Docs and examples licensed under MIT