Skip to main content
useMeetingSessionState() : Object Wraps meetingSessionState() and accepts a generic type parameter in TypeScript to work seamlessly with custom data type definitions.

Parameters (optional)

An object with the following properties:

Return value

An object with the following properties:
data
Object
The meeting session data
topology
string
'none' | 'peer' | 'sfu', the current meeting network topology

Example

import { useMeetingSessionState } from '@daily-co/daily-react';

export const UseMeetingSessionStateDemo = (props) => {
  const { data } = useMeetingSessionState();

  return (
    <div>
      <strong>Current session data:</strong>
      <pre>{JSON.stringify(data, null, 2)}</pre>
    </div>
  );
};

See also