Hooks
Available hooks
useRoomuseRoomControlsuseLobbyusePeerIdsuseLocalPeeruseLocalVideouseLocalScreenShareuseRemotePeeruseRemoteVideouseRemoteAudiouseRemoteScreenShareuseDataMessageuseDevicesuseActivePeersuseRoomMetadata
Example
import { useRoom } from '@huddle01/react/hooks';
const { joinRoom } = useRoom({
onJoin: () => {
console.log('Joined room');
}
});
// join room
joinRoom({
roomId: "YOUR_ROOM_ID",
token: "YOUR_TOKEN"
});