> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sublay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Use chat messages (deprecated)

> Deprecated alias for useLiveChatMessages

> [!WARNING]
>
> `useChatMessages` has been renamed to [`useLiveChatMessages`](https://docs.sublay.io/v7/hooks/chat/messages/use-live-chat-messages). The old name still works as an alias and forwards to the new hook, but it is deprecated and will be removed in a future major version. Update your imports:
>
> ```diff theme={null}
> - import { useChatMessages } from "@sublay/react-js";
> + import { useLiveChatMessages } from "@sublay/react-js";
> ```

The behaviour and signature are identical — see [`useLiveChatMessages`](https://docs.sublay.io/v7/hooks/chat/messages/use-live-chat-messages) for full documentation.

Looking to fetch a **filtered** or read-only list of messages (e.g. only messages that have replies)? Use [`useFetchManyChatMessages`](https://docs.sublay.io/v7/hooks/chat/messages/use-fetch-many-chat-messages) instead.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.