Skip to main content

Overview

useDeleteComment returns a function that deletes a comment. When used inside a CommentSectionProvider, prefer deleteComment from useCommentSection — it handles the Reddit-style soft-delete UI automatically.

Usage Example

Parameters

commentId
string
required
The ID of the comment to delete.

Returns

Promise<void> — resolves when the comment is deleted.