Function makeFetchHook

  • Creates a new hook that fetches data from an async source.

    Type Parameters

    • K extends AnyKey

    • V

    Parameters

    • fetcher: ((...key) => Promise<V>)

      The function that will do the data fetching.

        • (...key): Promise<V>
        • The function that will do the data fetching.

          Parameters

          • Rest ...key: K

          Returns Promise<V>

    Returns FetcherHook<K, V>

Generated using TypeDoc