useLocalSessionId
useLocalSessionId(): string
useLocalSessionId is a convenience hook to access the local participant's session_id. It is preferable over useLocalParticipant() when only the session_id is needed, which can help reduce unnecessary re-renders.
Return type
The local participant's session_id (a string) is returned by this hook. See the participant properties documentation for more information.
Sample code
Related references
- useActiveParticipant()
- useActiveSpeakerId()
- useLocalParticipant()
- useParticipantCounts()
- useParticipantIds()
- useParticipantProperty()
- useParticipant()
- useWaitingParticipants()