LiveKit docs › Hooks › usePreviewDevice

---

# usePreviewDevice

> 🔥 **Caution**
> 
> This API is deprecated: use `usePreviewTracks` instead

## Import

```typescript
import { usePreviewDevice } from "@livekit/components-react";

```

## Properties

- **`deviceId`** _(string)_: 

- **`enabled`** _(boolean)_: 

- **`kind`** _('videoinput' | 'audioinput')_: 

## Returns

```typescript
{
  selectedDevice: MediaDeviceInfo | undefined;
  localTrack: T | undefined;
  deviceError: Error | null;
}

```

---

This document was rendered at 2026-06-07T11:32:19.571Z.
For the latest version of this document, see [https://docs.livekit.io/reference/components/react/hook/usepreviewdevice.md](https://docs.livekit.io/reference/components/react/hook/usepreviewdevice.md).

To explore all LiveKit documentation, see [llms.txt](https://docs.livekit.io/llms.txt).