Escape hatch for accessing the raw store and client instances.
Use this for advanced scenarios where the provided hooks do not cover your use case. Prefer the typed hooks (e.g., useRoom, useChat) for most cases, as they keep subscriptions efficient.
useRoom
useChat
Object containing store (the HiyveStoreRN instance) and client (the underlying RN WebRTC client, or null if not connected)
store
HiyveStoreRN
client
null
import { useClient } from '@hiyve/rn-react';function AdvancedControls() { const { store, client } = useClient(); const handleCustomAction = () => { if (client) { // Direct client access for unsupported features } }; return <Button title="Custom" onPress={handleCustomAction} />;} Copy
import { useClient } from '@hiyve/rn-react';function AdvancedControls() { const { store, client } = useClient(); const handleCustomAction = () => { if (client) { // Direct client access for unsupported features } }; return <Button title="Custom" onPress={handleCustomAction} />;}
Escape hatch for accessing the raw store and client instances.
Use this for advanced scenarios where the provided hooks do not cover your use case. Prefer the typed hooks (e.g.,
useRoom,useChat) for most cases, as they keep subscriptions efficient.