t-hooks
    Preparing search index...

    Function useFreeGeneratorCallback

    • Unmanaged generator callback hook

      Memoizes a generator function as a task function. The hook does not cancel the returned task on unmount, dependency change, or a later call. The caller owns that task.

      Type Parameters

      • A extends any[]

        callback argument types

      • T

        yielded underlying type

      • TT extends Task<T>

        yielded task type

      • R

        resulting task resolve type

      Parameters

      • taskGeneratorFunction: TaskGeneratorFunction<A, T, TT, R>

        task generator function

      • deps: DependencyList

        dependency list

      Returns TaskFunction<A, R>

      memoized task function

      useFreeTaskCallback