<!-- Generated from hooks/use-viewer-hover.mdx; edit the MDX source. -->

Package: @liveroom-tech/react-immersive
Canonical: https://react-immersive.liveroom.dev/docs/hooks/use-viewer-hover

# `useViewerHover`

Tracks which mesh the user is currently hovering in the viewer.

## Usage

```tsx
import { useViewerHover } from "@liveroom-tech/react-immersive";

const { hoveredObjectBinding, handleHoveredObject } = useViewerHover();

<ModelViewer
  onObjectHover={handleHoveredObject}
  ...
/>

// hoveredObjectBinding is the currently hovered binding or null
```

## Returns

| Name | Type | Description |
|------|------|-------------|
| `hoveredObjectBinding` | `ObjectBinding \| null` | The currently hovered binding, or `null` |
| `handleHoveredObject` | `(binding: ObjectBinding \| null) => void` | Callback to pass to `onObjectHover` |
