This is beta documentation for Stream Chat React Native SDK v9. For the latest stable version, see the latest version (v8) .

useChannelActions

Creates imperative channel action handlers such as pin, archive, leave, and mute.

Best Practices

  • Use these handlers directly in row actions and action sheets.
  • Guard UI against repeated taps while async actions are pending.
  • Use direct-chat specific actions (muteUser, blockUser) only when applicable.
  • Keep channel lifecycle actions (leave, deleteChannel) behind confirmation UI.
  • Handle optimistic UI updates separately from these network calls.

Usage

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

const actions = useChannelActions(channel);

await actions.muteChannel();
await actions.archive();

Parameters

NameTypeRequiredDescription
channelChannelYesChannel to perform actions on.

Returns

TypeDescription
ChannelActionsAction handlers for pin/archive/mute/block flows.