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