Configuration options for the sync hook
Object containing sync functions and connection state
This hook handles real-time synchronization of Q&A state across all participants in a room.
Message Flow:
Owner Responsibilities:
function QAComponent() {
const questionsRef = useRef(new Map());
const [questions, setQuestions] = useState([]);
const {
postQuestion,
answerQuestion,
deleteQuestion,
toggleVote,
pinQuestion,
connected,
} = useQASync({
isOwner,
localUserId: userId,
localUserName: userName,
questionsRef,
onStateUpdate: setQuestions,
});
}
Hook for Q&A synchronization via the semantic relay.