import { useMutedUsers } from "stream-chat-react-native";
const mutedUsers = useMutedUsers() ?? [];useMutedUsers
Returns the current list of muted users from the client state store.
Best Practices
- Use this hook to support direct-chat mute and moderation UI.
- Handle undefined values during initialization states.
- Avoid duplicating mute-user event subscriptions in list components.
- Keep lookups optimized when checking mute state repeatedly.
- Pair with
useChannelMuteActivefor per-channel mute display logic.
Usage
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| channel | Channel | No | Deprecated. No longer necessary and kept for backwards compatibility only. Call useMutedUsers() with no arguments. |
Returns
| Type | Description |
|---|---|
Mute[] | undefined | List of muted users for the client. |