Function useTaskMemo

  • Task-based asynchronous memo hook (convinience binding)

    Task equivalent to useMemo hook allowing to perform asynchronous memorized transformations

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

    Type Parameters

    • T

      resulting task resolve type

    Parameters

    • initialValue: T

      initial value available immediately

    • taskFunction: (() => Task<T>)

      task taskFunction to be invoked to get transformed value

        • (): Task<T>
        • Returns Task<T>

    • deps: DependencyList

      depandency list

    Returns T

    memorized value

    See

    useTaskMemoState

Generated using TypeDoc