Function useLimiter

Creates a limiter which can be used to debounce or throttle a function call.

  • Parameters

    • __namedParameters: LimiterOptions & { cancelOnUnmount?: boolean; id: string }
      • OptionalcancelOnUnmount?: boolean

        If true, any previously scheduled functions are automatically canceled on unmount

        false

      • id: string

        A technical, but human-readable ID, which isn't guaranteed to be unique

    Returns Limiter