CupThread React Native & Expo SDK - v0.1.0
    Preparing search index...

    Interface UseToggleVoteResult

    Result of useToggleVote.

    interface UseToggleVoteResult {
        clearVoteError: (itemId?: string) => void;
        getVoteError: (itemId: string) => Error | null;
        isVoting: (itemId: string) => boolean;
        toggleVote: (item: FeatureRequestItem) => void;
        voteError: Error | null;
    }
    Index
    clearVoteError: (itemId?: string) => void

    Clears the active vote error state.

    getVoteError: (itemId: string) => Error | null

    Returns the error for a specific item, or null if none occurred or has been cleared.

    isVoting: (itemId: string) => boolean

    Whether a vote toggle request is currently in flight for the given item.

    toggleVote: (item: FeatureRequestItem) => void

    Toggles the vote on a feature request with optimistic update, server reconciliation, and delta-based rollback on failure. No-ops while the same item already has a vote request in flight or for the user's own requests.

    voteError: Error | null

    Most recent vote error, or null if the last attempt succeeded or has been cleared.