Interface IUseEventListenerProps<T, L>

Type Parameters

  • T

  • L

Hierarchy

Properties

getIsDisabled?: (() => boolean)

Type declaration

    • (): boolean
    • A function that returns a boolean indicating whether the hook should be disabled.

      Returns boolean

isDisabled?: boolean

If true, disables the event listener.

listener: L

The event listener function to be executed when the event occurs.

options?: boolean | AddEventListenerOptions

Options for the event listener (e.g., capture, passive).

A reference to the target element to which the event listener will be attached.

target: T

The type of event to listen for.