useIsChannelMuted

Returns the channel mute status and keeps it in sync with client mute events.

Best Practices

  • Use this hook instead of manually checking channel.muteStatus() in render.
  • Read muted from the returned object for unread badge and style decisions.
  • Keep mute indicators subtle and consistent across channel previews.
  • Avoid duplicating mute event listeners in custom list components.
  • Handle default unmuted state while initial data is syncing.

Usage

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

const MutedIndicator = ({ channel }: { channel: Channel }) => {
  const { muted } = useIsChannelMuted(channel);
  return muted ? <Text>Muted</Text> : null;
};

Parameters

NameTypeRequiredDescription
channelChannelYesChannel whose mute status is observed.

Returns

The hook returns the channel mute-status object (from channel.muteStatus()):

NameTypeDescription
mutedbooleanWhether the channel is currently muted.
createdAtDate | nullWhen the mute was created, or null if not muted.
expiresAtDate | nullWhen the mute expires, or null if it never does.