> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# useParticipantProperty

> useParticipantProperty returns the requested property belonging to any given session_id.

`useParticipantProperty(sessionId: string, propertyPath: string | string[]): participant[propertyPath]`

Use this hook instead of [`useParticipant`](https://docs.daily.co/reference/daily-react/use-participant) when you only need to subscribe to a small subset of participant properties to optimize for React render cycles. `useParticipant` triggers a re-render when any property in the requested participant object changes. `useParticipantProperty` only triggers a re-render when the selected property changes.

## Parameters

**session\_id** `string` *required*

A unique identifier for the participant

**propertyPath** `string | string[]` *required*

The path to a desired participant property, in relation to the parent participant object. Eg: `"tracks.audio.subscribed"`

## Return value

Returns the value of the requested property (`typeof participant[propertyPath]`), which will be the type of the requested property.

## Example

```jsx theme={null}
import {
  useLocalSessionId,
  useParticipantProperty,
} from '@daily-co/daily-react';

export const ParticipantPropertyExample = () => {
  const localSessionId = useLocalSessionId();
  const userName = useParticipantProperty(localSessionId, 'user_name');

  // Accessing nested properties
  const isParticipantAudioSubscribed = useParticipantProperty(
    'participant-session-id',
    'tracks.audio.subscribed'
  );

  // Requesting multiple properties
  const [isLocalOwner, localUserName] = useParticipantProperty(localSessionId, [
    'owner',
    'user_name',
  ]);

  console.log(isLocalOwner); // true;
  console.log(localUserName); // 'my_username';

  return (
    <div>
      {userName} is {isParticipantAudioSubscribed ? '' : 'not'} subscribed
    </div>
  );
};
```

## See also

> [card] Hooks
>
> * [useParticipant()](https://docs.daily.co/reference/daily-react/use-participant.md)
> * [useLocalSessionId()](https://docs.daily.co/reference/daily-react/use-local-session-id.md)
> * [useParticipantIds()](https://docs.daily.co/reference/daily-react/use-participant-ids.md)
> * [useParticipantCounts()](https://docs.daily.co/reference/daily-react/use-participant-counts.md)
> * [useActiveParticipant()](https://docs.daily.co/reference/daily-react/use-active-participant.md)
> * [useActiveSpeakerId()](https://docs.daily.co/reference/daily-react/use-active-speaker-id.md)
> * [useLocalParticipant()](https://docs.daily.co/reference/daily-react/use-local-participant.md)
> * [useWaitingParticipants()](https://docs.daily.co/reference/daily-react/use-waiting-participants.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.