Hooks
Available hooks
// Example
import {
useAudio,
useEventListener,
useHuddle01,
useLobby,
usePeers,
useRoom,
useVideo,
} from '@huddle01/react-native/hooks';
import React from 'react';
import {Text, View} from 'react-native';
function App(): JSX.Element {
const {initialize, isInitialized} = useHuddle01();
const {joinLobby, leaveLobby} = useLobby();
const {
fetchAudioStream,
produceAudio,
stopAudioStream,
stopProducingAudio,
stream: micStream,
} = useAudio();
const {
fetchVideoStream,
produceVideo,
stopVideoStream,
stopProducingVideo,
stream: camStream,
} = useVideo();
const {joinRoom, leaveRoom} = useRoom();
const {peers} = usePeers();
return <View><Text>Hello World</Text></View>
}
export default App;