LiveKit docs › Hooks › useTrackByName

---

# useTrackByName

This function `useTrackByName` allows you to access a track by referencing its track name. Inside the function, it ensures that the a valid `participant` reference is available by checking for both a passed participant argument and, if not available, a valid participant context.

## Import

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

```

## Properties

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

- **`participant`** _(Participant)_ (optional): 

## Returns

```typescript
import("@livekit/components-core").TrackReferenceOrPlaceholder;

```

---

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

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