> ## Documentation Index
> Fetch the complete documentation index at: https://replyke-feat-push-rich-payload-fields.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Remove Comment Downvote

# `useRemoveEntityDownvote`

## Overview

The `useRemoveEntityDownvote` hook provides a way to remove a previously cast downvote from an entity.

## Usage Example

```tsx theme={null}
import { useRemoveEntityDownvote } from "@replyke/react-js";
import { Button } from "@/components/ui/button";

function EntityComponent({ entityId }: { entityId: string }) {
  const removeDownvote = useRemoveEntityDownvote();

  const handleRemoveDownvote = async () => {
    try {
      const response = await removeDownvote({ entityId });
      console.log("Downvote removed:", response);
    } catch (err) {
      console.error("Failed to remove downvote:", err);
    }
  };

  return <Button onClick={handleRemoveDownvote}>Remove Downvote</Button>;
}
```

## Parameters & Returns

### Parameters

The `removeEntityDownvote` function returned by the hook accepts a single object with the following field:

<ParamField path="entityId" type="string">
  The ID of the entity whose downvote to remove.
</ParamField>

### Returns

The function returns a `Promise<Entity>` representing the API response:

<ResponseField name="Updated comment" type="Entity">
  The updated entity after the downvote is successfully removed.
</ResponseField>
