> ## 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.

# useChannel

Hook to get data about a channel. You can use this hook to get channel metadata and if the user has joined the channel.

## Imports

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

## Definition

```ts theme={null}
function useChannel(
  spaceId: string,
  channelId: string,
  config?: ObservableConfig.FromObservable<Channel>,
): ObservableValue<ChannelModel>
```

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

## Parameters

### spaceId

* **Type:** `string`

The id of the space the channel belongs to.

### channelId

* **Type:** `string`

The id of the channel to get data about.

### config

* **Type:** `ObservableConfig.FromObservable<Channel>`
* **Optional**

Configuration options for the observable.

## Return Type

The ChannelModel data.

```ts theme={null}
ObservableValue<ChannelModel>
```
