Skip to main content

useUpvoteComment

Overview

The useUpvoteComment hook provides a way to upvote an comment.

Usage Example

Parameters & Returns

Parameters

The upvoteComment function returned by the hook accepts a single object with the following field:
commentId
string
The ID of the comment to be upvoted.

Returns

The function returns a Promise<Comment> representing the API response:
Updated comment
Comment
The updated comment after it is successfully upvoted.