import { useMutedUsers } from "stream-chat-react-native";
const mutedUsers = useMutedUsers(channel) ?? [];This is beta documentation for Stream Chat React Native SDK v9. For the latest stable version, see the latest version (v8)
.
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 | Optional channel anchor used by internal syncing. |
Returns
| Type | Description |
|---|---|
Mute[] | undefined | List of muted users for the client. |