UNPKG

@thibault.sh/hooks

Version:

A comprehensive collection of React hooks for browser storage, UI interactions, and more

11 lines (8 loc) 384 B
import { RefObject } from 'react'; /** * Hook that detects hover state on an element * @param ref - (optional) React ref object for the element to monitor * @returns Tuple containing ref to attach to element and boolean indicating hover state */ declare const useHover: <T extends HTMLElement>(_ref?: RefObject<T | null> | null) => [RefObject<T>, boolean]; export { useHover };