Function useThrottle

  • Create a throttled function. Uses

    See

    useEventHandler so no need for useCallback even when using state/props inside

    Type Parameters

    • In extends unknown[]

    Parameters

    • fn: Fn<In, void>

      the function to throttle

    • ms: number

      number of milliseconds between each call

    Returns Fn<In, void>

    new throttled function

Generated using TypeDoc