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 useChannelMuteActive for per-channel mute display logic.

Usage

import { useMutedUsers } from "stream-chat-react-native";

const mutedUsers = useMutedUsers(channel) ?? [];

Parameters

NameTypeRequiredDescription
channelChannelNoOptional channel anchor used by internal syncing.

Returns

TypeDescription
Mute[] | undefinedList of muted users for the client.