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

    Options for the usePollSync hook.

    interface UsePollSyncOptions {
        isOwner: boolean;
        localUserId: string;
        localUserName: string;
        onNewPoll?: (poll: Poll) => void;
        onPollEnded?: (poll: Poll) => void;
        onPollStarted?: (poll: Poll) => void;
        onStateUpdate: (polls: Poll[], userVotes?: Map<string, UserVote>) => void;
        pollsRef: RefObject<Map<string, Poll>>;
        userVotesRef: RefObject<Map<string, UserVote>>;
    }
    Index

    Properties

    isOwner: boolean

    Whether the current user is the room owner

    localUserId: string

    Local user ID

    localUserName: string

    Local user display name

    onNewPoll?: (poll: Poll) => void

    Callback when a new poll is created remotely

    onPollEnded?: (poll: Poll) => void

    Callback when a poll is ended remotely

    onPollStarted?: (poll: Poll) => void

    Callback when a poll is started remotely

    onStateUpdate: (polls: Poll[], userVotes?: Map<string, UserVote>) => void

    Callback when state is updated from remote

    pollsRef: RefObject<Map<string, Poll>>

    Ref to the polls map

    userVotesRef: RefObject<Map<string, UserVote>>

    Ref to user votes map