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

# Remove reaction

> Remove the authenticated user's reaction from an entity or comment

## Overview

`useRemoveReaction` is a low-level hook that removes the authenticated user's current reaction. For most use cases, use [`useReactionToggle`](/v8/hooks/reactions/use-reaction-toggle) instead.

<Note>Requires an authenticated user.</Note>

## Usage Example

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

function RemoveReactionButton({ entityId }: { entityId: string }) {
  const removeReaction = useRemoveReaction();

  const handle = async () => {
    await removeReaction({ targetType: "entity", targetId: entityId });
  };

  return <button onClick={handle}>Remove Reaction</button>;
}
```

## Parameters

<ParamField path="targetType" type="&#x22;entity&#x22; | &#x22;comment&#x22;" required>
  The type of the reaction target.
</ParamField>

<ParamField path="targetId" type="string" required>
  The ID of the entity or comment.
</ParamField>

## Returns

<ResponseField name="Entity | Comment" type="Entity | Comment">
  The updated entity or comment with the reaction removed (`userReaction: null` and decremented counts).
</ResponseField>

## Blocks

Removing a reaction is undoing the user's own action, so it works across a block as long as the target is visible to the user:

* **Comment:** the reaction is removed whenever the comment is visible to the user — in full, flagged `isAuthorBlocked`, or as a placeholder (for example when its author blocked them). The returned comment is shaped the way the user sees it. If the comment is on an entity whose author blocked the user, the call fails with `404 comment/not-found` and nothing changes — unless it's the user's own comment, which stays visible to them, so the reaction is removed.
* **Entity:** if the entity's author blocked the user, the call fails with `404 entity/not-found` and nothing changes.

See [Remove Comment Reaction](/v8/api-reference/comments/remove-reaction) and [Remove Entity Reaction](/v8/api-reference/entities/remove-reaction).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.