Skip to main content
useParticipantCounts(): Object

Return value

Returns an object with the following properties:
present
number
Amount of participants where hasPresence is true
hidden
number
Amount of participants where hasPresence is false

Example

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

export const useParticipantCountsDemo = () => {
  const { present, hidden } = useParticipantCounts();

  return (
    <ul>
      <li>{present} participants with presence</li>
      <li>{hidden} participants without presence</li>
    </ul>
  );
};

See also