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

# useSendReaction

Hook to send a reaction to a message in a stream.

Reaction can be any string value, including emojis.

## Imports

```ts theme={null}
import { useSendReaction } from '@towns-protocol/react-sdk'
```

## Examples

```ts theme={null}
import { useSendReaction } from '@towns-protocol/react-sdk'

const { sendReaction } = useSendReaction('stream-id')
sendReaction(messageEventId, '🔥')
```

## Definition

```ts theme={null}
function useSendReaction(
  streamId: string,
  config?: ActionConfig<Channel["sendReaction"]>,
): {
    data: {
        eventId: string;
    } | undefined;
    error: Error | undefined;
    isPending: boolean;
    isSuccess: boolean;
    isError: boolean;
    sendReaction: (refEventId: string, reaction: string) => Promise<{
        eventId: string;
    }>;
}
```

**Source:** [useSendReaction](https://github.com/towns-protocol/towns/blob/main/packages/react-sdk/src/useSendReaction.ts)

## Parameters

### streamId

* **Type:** `string`

The id of the stream to send the reaction to.

### config

* **Type:** `ActionConfig<Channel["sendReaction"]>`
* **Optional**

Configuration options for the action.

## Return Type

The `sendReaction` action and its loading state.

```ts theme={null}
{
    data: {
        eventId: string;
    } | undefined;
    error: Error | undefined;
    isPending: boolean;
    isSuccess: boolean;
    isError: boolean;
    sendReaction: (refEventId: string, reaction: string) => Promise<{
        eventId: string;
    }>;
}
```
