# useChannelPreviewDisplayPresence

Returns whether avatar presence should be shown for a channel preview.

This hook returns `true` only for one-to-one channels where the other member is online.

## Best Practices

- Use this hook for direct-message previews, not group channels.
- Pair presence indicators with lightweight UI to keep scrolling smooth.
- Avoid separate client event subscriptions in list rows.
- Treat the return value as derived UI state and render conditionally.
- Keep presence rendering consistent with your app's avatar patterns.

## Usage

```tsx
import { useChannelPreviewDisplayPresence } from "stream-chat-react-native";

const PreviewAvatar = ({ channel }: { channel: Channel }) => {
  const showPresence = useChannelPreviewDisplayPresence(channel);
  return <ChannelAvatar channel={channel} showOnlineIndicator={showPresence} />;
};
```

## Parameters

| Name    | Type      | Required | Description                            |
| ------- | --------- | -------- | -------------------------------------- |
| channel | `Channel` | Yes      | Channel used to derive presence state. |

## Returns

| Type      | Description                                                  |
| --------- | ------------------------------------------------------------ |
| `boolean` | Whether to display online presence in a channel preview row. |


---

This page was last updated at 2026-04-17T17:33:46.347Z.

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/react-native/hooks/channel-preview/use-channel-preview-display-presence/](https://getstream.io/chat/docs/sdk/react-native/hooks/channel-preview/use-channel-preview-display-presence/).