# useChannelOnlineMemberCount

Returns the number of online members in a channel excluding the current user.

## Best Practices

- Use this hook for lightweight presence summaries in list rows.
- Keep online count formatting concise for compact channel previews.
- Handle optional returns when channel is not yet available.
- Avoid recomputing member online counts manually in render.
- Pair this hook with member-state hooks only when additional details are needed.

## Usage

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

const onlineCount = useChannelOnlineMemberCount(channel) ?? 0;
```

## Parameters

| Name    | Type      | Required | Description                           |
| ------- | --------- | -------- | ------------------------------------- |
| channel | `Channel` | No       | Channel used to compute online count. |

## Returns

| Type                    | Description                                |
| ----------------------- | ------------------------------------------ |
| `number` \| `undefined` | Number of online members (excluding self). |


---

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

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