# Reactions

Send real-time emoji reactions during calls.

## Best Practices

- Use `emoji_code` for consistent emoji display across different platforms.
- Use `resetReaction` to clear reactions after a timeout for better UX.
- Store temporary data in `custom` field for application-specific needs.
- Consider using the built-in `ReactionsButton` and `Reaction` components for quick integration.

## Reactions

>
> **Tip:** Use the built-in [`ReactionsButton`](https://getstream.io/video/docs/react/v2/ui-components/call/call-controls/#reactionsbutton) and [`Reaction`](https://getstream.io/video/docs/react/v2/ui-components/utility/reaction/) components, or build custom reactions.
>

### Sending reactions

```ts
const call: Call;

await call.sendReaction({ type: "raised-hand" });
```

The `type` can be any string. Add optional data:

```ts
const call: Call;

await call.sendReaction({
  type: "raised-hand",
  emoji_code: ":raise-hand:",
  custom: { clearAfterTimeout: true },
});
```

The `emoji_code` determines the displayed emoji. The `custom` property accepts any data.

### Receiving reactions

Reactions require [watching the call](https://getstream.io/video/docs/react/v2/guides/events/#call-events). Access via [participant state](https://getstream.io/video/docs/react/v2/guides/call-and-participant-state/#participant-state):

```ts
const { useParticipants } = useCallStateHooks();
const participants = useParticipants();

const reactions = participants.map((p) => p.reaction);
```

Or subscribe to `call.reaction_new` events. See [Events guide](https://getstream.io/video/docs/react/v2/guides/events/).

### Clearing reactions

Clear reactions locally with `resetReaction` (doesn't send WebSocket messages):

```ts
const call: Call;
const { useParticipants } = useCallStateHooks();
const participants = useParticipants();

call.resetReaction(participants[0].sessionId);
```

Useful for displaying reactions temporarily.

---

For the most recent version of this documentation, visit [https://getstream.io/video/docs/react/v2/guides/reactions/](https://getstream.io/video/docs/react/v2/guides/reactions/).