Home > @lndsld/react-hooks > usePointerEvent
Subscribe to pointer events
Signature:
declare function usePointerEvent<E extends HTMLElement>(eventType: MouseEventType, handler: NativeMouseEventHandler, options?: UsePointerEventOptions<E>): void;
| 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