React Router API Reference
    Preparing search index...

    Function useAsyncValue

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

      Returns unknown

      The resolved value from the nearest Await component

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

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

      @public

      framework

      data