t-hooks
    Preparing search index...

    Function useTaskMemo

    • Task-based asynchronous memo hook (convenience binding)

      Task-based hook for asynchronous memoized transformations

      Task execution is automatically interrupted in case of hook re-render or unmounting. This way, only one task is running at any given time

      Type Parameters

      • T

        resulting task resolve type

      Parameters

      • initialValue: T

        initial value available immediately

      • taskFunction: () => Task<T>

        task function to be invoked to get the transformed value

      • deps: DependencyList

        dependency list

      Returns T

      memoized value

      useTaskMemoState