> ## 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.

# useLocalSessionId

> useLocalSessionId is a convenience hook to access the local participant's session_id.

`useLocalSessionId(): string`

Prefer this over [`useLocalParticipant()`](/reference/daily-react/use-local-participant) when you only need the `session_id`, to reduce unnecessary re-renders.

## Return value

The local participant's `session_id` (a string) is returned by this hook. See the [participant properties](/reference/daily-js/types/daily-participant) documentation for more information.

## Example

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

export const UseLocalSessionIdDemo = () => {
  const localSessionId = useLocalSessionId();

  return <div>Your ID: {localSessionId}</div>;
};
```

## See also

<CardGroup>
  <Card title="Hooks" icon="code" iconType="solid">
    * [useLocalParticipant()](/reference/daily-react/use-local-participant)
    * [useParticipant()](/reference/daily-react/use-participant)
    * [useParticipantProperty()](/reference/daily-react/use-participant-property)
    * [useParticipantIds()](/reference/daily-react/use-participant-ids)
    * [useParticipantCounts()](/reference/daily-react/use-participant-counts)
    * [useActiveParticipant()](/reference/daily-react/use-active-participant)
    * [useActiveSpeakerId()](/reference/daily-react/use-active-speaker-id)
    * [useWaitingParticipants()](/reference/daily-react/use-waiting-participants)
  </Card>
</CardGroup>
