Helpful
    Preparing search index...

    Function useAsyncState

    • Represents a hook to use async data.

      Type Parameters

      • T

        The type of data that will eventually be given.

      Parameters

      • load: () => Promise<T>

        The load method for the data.

      • deps: DependencyList = []

        The dependencies to force a refresh of the data.

      Returns ZAsyncDataTuple<T>

      A tuple where the first item is the current state of the data and the 2nd argument is a refresh function to refresh the data.