# useChannelPreviewDraftMessage

Returns the current draft message for a channel preview when the composer has pending text and attachments.

## Best Practices

- Use this hook to signal draft state in `ChannelList` rows.
- Treat the return value as optional and render fallback UI when absent.
- Do not mutate the returned draft object.
- Keep draft indicators lightweight to preserve list performance.
- Pair this hook with custom preview text formatting for clarity.

## Usage

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

const DraftBadge = ({ channel }: { channel: Channel }) => {
  const draftMessage = useChannelPreviewDraftMessage({ channel });

  if (!draftMessage) return null;
  return <Text>{`Draft: ${draftMessage.text ?? "Attachment"}`}</Text>;
};
```

## Parameters

### `channel`

| Type      | Required | Description                                         |
| --------- | -------- | --------------------------------------------------- |
| `Channel` | Yes      | Channel whose message composer draft state is read. |

## Returns

| Type                          | Description                                |
| ----------------------------- | ------------------------------------------ |
| `DraftMessage` \| `undefined` | Draft message payload for channel preview. |


---

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

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