LiveKit docs › Hooks › usePreviewTracks

---

# usePreviewTracks

## Import

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

```

## Properties

- **`onError`** _((err: Error) => void)_ (optional): 

## Returns

```typescript
(LocalAudioTrack | LocalVideoTrack)[] | undefined

```

---

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

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