lndsld

Home > @lndsld/react-hooks > usePointerEvent

usePointerEvent() function

Subscribe to pointer events

Signature:

declare function usePointerEvent<E extends HTMLElement>(eventType: MouseEventType, handler: NativeMouseEventHandler, options?: UsePointerEventOptions<E>): void;

Parameters

Parameter Type Description
eventType MouseEventType type of pointer event to subscribe
handler NativeMouseEventHandler callback that will be invoked when pointer event dispatched
options UsePointerEventOptions<E> (Optional) configuration options for hook

Returns:

void