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

# useDm

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

## Imports

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

## Definition

```ts theme={null}
function useDm(
  streamId: string,
  config?: ObservableConfig.FromData<DmModel>,
): ObservableValue<DmModel>
```

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

## Parameters

### streamId

* **Type:** `string`

The id of the DM to get the data of.

### config

* **Type:** `ObservableConfig.FromData<DmModel>`
* **Optional**

Configuration options for the observable.

## Return Type

The DmModel of the DM.

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