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

Name Type Required Description
channel Channel Yes Channel to perform actions on.

Returns

Type Description
ChannelActions Action handlers for pin/archive/mute/block flows.
Add Chat to my app: getstream.io/SKILL.md

The fastest way to build with Stream. Start a new project or improve an existing one. Full CLI and documentation integration out of the box.


Ask your agent:

/stream Build me a Social App with Feeds and Moderation.
/stream Any livestream calls running?
/stream Chat React Native v9: <Your Question>