Function useActualCallback

Executes a given callback function while preserving its reference and memoizing it with specified dependencies.

  • Type Parameters

    • T extends ((...args: any[]) => any)

      Type of the callback function

    Parameters

    • run: T

      The callback function to be executed

    • Optionaldeps: any[] = []

      The dependencies to be memoized

    Returns T

    • The memoized callback function