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

useChannelActionItems

Builds channel action items (mute, archive, leave, delete, etc.) for swipe rows and action sheets.

Best Practices

  • Use this hook as the source of truth for channel row actions.
  • Prefer getChannelActionItems to customize ordering/visibility instead of rebuilding defaults.
  • Keep custom action handlers async-safe and user-feedback friendly.
  • Distinguish direct chats vs group channels when customizing labels.
  • Keep destructive actions clearly separated from standard actions.

Usage

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

const actionItems = useChannelActionItems({
  channel,
  getChannelActionItems: ({ defaultItems }) =>
    defaultItems.filter((item) => item.id !== "archive"),
});

Parameters

NameTypeRequiredDescription
channelChannelYesChannel used to compute available actions.
getChannelActionItemsGetChannelActionItemsNoOptional transformer for default action items.

Returns

TypeDescription
ChannelActionItem[]Ordered action definitions for channel UI controls.