FluentUI Compat

Home > @cascadiacollections/fluentui-compat > useOnEvent

useOnEvent() function

Signature:

export declare function useOnEvent<K extends keyof DocumentEventMap>(target: Document | null | undefined, eventName: K, handler: (event: DocumentEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void;

Parameters

Parameter

Type

Description

target

Document | null | undefined

eventName

K

handler

(event: DocumentEventMap[K]) => void

options

boolean | AddEventListenerOptions

(Optional)

Returns:

void

  • Edit this page
In this article
Back to top FluentUI React complimentary components and utilities focused on render performance