Skip to main content

Function: useEventListener()

Call Signature

useEventListener<K>(target, event, handler?, options?): VoidFunction

Defined in: hooks/useEventListener.ts:8

Type Parameters

K

K extends keyof DocumentEventMap

Parameters

target

Target

event

K

handler?

(event) => void

options?

Options

Returns

VoidFunction

Call Signature

useEventListener<K>(target, event, handler?, options?): VoidFunction

Defined in: hooks/useEventListener.ts:14

Type Parameters

K

K extends keyof WindowEventMap

Parameters

target

Target

event

K

handler?

(event) => void

options?

Options

Returns

VoidFunction

Call Signature

useEventListener<K>(target, event, handler?, options?): VoidFunction

Defined in: hooks/useEventListener.ts:20

Type Parameters

K

K extends keyof GlobalEventHandlersEventMap

Parameters

target

Target

event

K

handler?

(event) => void

options?

Options

Returns

VoidFunction