LiveKit docs › Hooks › useEnsureParticipant

---

# useEnsureParticipant

Ensures that a participant is provided, either via context or explicitly as a parameter. If not inside a `ParticipantContext` and no participant is provided, an error is thrown.

## Import

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

```

## Properties

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

## Returns

```typescript
Participant;

```

---

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

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