> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replyke.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete comment

> Delete a comment

## 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

```tsx theme={null}
import { useDeleteComment } from "@replyke/react-js";

function DeleteButton({ commentId }: { commentId: string }) {
  const deleteComment = useDeleteComment();

  return (
    <button onClick={() => deleteComment({ commentId })}>Delete</button>
  );
}
```

## Parameters

<ParamField path="commentId" type="string" required>
  The ID of the comment to delete.
</ParamField>

## Returns

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