import { useMutedChannels } from "stream-chat-react-native";
const mutedChannels = useMutedChannels(channel) ?? [];This is beta documentation for Stream Chat React Native SDK v9. For the latest stable version, see the latest version (v8)
.
useMutedChannels
Returns the current list of muted channels from the client state store.
Best Practices
- Use this hook when channel-list behavior depends on global channel mutes.
- Handle undefined while channel/client data is initializing.
- Avoid additional client event listeners for channel mute updates.
- Keep filtering logic memoized when processing large mute lists.
- Use with
useChannelMuteActivewhen rendering per-row mute state.
Usage
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| channel | Channel | No | Optional channel anchor used by internal syncing. |
Returns
| Type | Description |
|---|---|
ChannelMute[] | undefined | List of muted channels for the client. |