LiveKit docs › Components › ParticipantContextIfNeeded

---

# ParticipantContextIfNeeded

The `ParticipantContextIfNeeded` component only creates a `ParticipantContext` if there is no `ParticipantContext` already.

## Import

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

```

## Usage

```tsx
<ParticipantContextIfNeeded participant={trackReference.participant}>
  ...
</ParticipantContextIfNeeded>

```

---

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

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