useHover

Detect when the pointer is over an element.

This is custom React hooks, you need to follow the Basic Rules when you use it.

General

The text changes while the pointer is over the box.

APIs

useHover

const useHover = <T extends HTMLElement = HTMLElement>() => {
  hovered: boolean
  ref: RefObject<T | null>
}
Edit this page on GitHub