Function: useActivity()¶
useActivity():
ActivityState
Defined in: hooks/useActivity.ts:20
Reads the current ActivityState (all activity groups for the thread)
from the nearest KabooActivityProvider. Re-renders on each new
ACTIVITY_SNAPSHOT.
Returns¶
Example¶
import { useActivity } from "@pgege/kaboo-react";
function GroupCount() {
const { groups } = useActivity();
return <span>{Object.keys(groups).length} agents</span>;
}