Hiyve Components - v1.0.0
    Preparing search index...

    Return value of the useQA hook.

    interface QAState {
        answerQuestion: (questionId: string, answer: string) => void;
        askQuestion: (text: string) => void;
        handleDataMessage: (data: Record<string, unknown>) => void;
        questions: Question[];
        upvote: (questionId: string) => void;
    }
    Index

    Properties

    answerQuestion: (questionId: string, answer: string) => void

    Answer a question and broadcast the answer via data message.

    askQuestion: (text: string) => void

    Submit a new question and broadcast it via data message.

    handleDataMessage: (data: Record<string, unknown>) => void

    Process an incoming Q&A data message from a remote user.

    questions: Question[]

    All questions (both answered and unanswered).

    upvote: (questionId: string) => void

    Toggle an upvote on a question and broadcast it via data message.