t-hooks
    Preparing search index...

    Function useMultiTaskCallback

    • Task-based callback hook that allows concurrent tasks

      Each call starts a new task and leaves tasks already running in place. Every in-flight task is cancelled on unmount. Dependency changes do not cancel work already started.

      Type Parameters

      • A extends any[]

        callback argument types

      Parameters

      • taskFunction: TaskFunction<A, void>

        task function to be invoked as callback; the task resolves to void

      • deps: DependencyList

        dependency list; the task function is memoized with these dependencies

      Returns (...args: A) => void

      callback to be invoked