# useChannelName

Reads `channel.data?.name` reactively and re-renders when the channel is updated.

## Best Practices

- Use this hook to render the channel name in headers, previews, and details screens.
- Treat the value as read-only state derived from the channel store.
- Handle `undefined` when the channel has no name or is unavailable.
- Prefer this hook over reading `channel.data?.name` directly so the UI stays in sync with `channel.updated` events.
- Combine with a display-name fallback (e.g. member names) for direct messages without an explicit name.

## Usage

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

const name = useChannelName(channel);
```

## Parameters

| Name    | Type      | Required | Description                 |
| ------- | --------- | -------- | --------------------------- |
| channel | `Channel` | No       | Channel whose name is read. |

## Returns

| Type                    | Description                                    |
| ----------------------- | ---------------------------------------------- |
| `string` \| `undefined` | The channel's name, or `undefined` if not set. |


---

This page was last updated at 2026-06-30T12:00:28.134Z.

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