useCanEditChannel

Returns whether the current user can edit (update) the channel.

It checks for the update-channel capability via useChannelOwnCapabilities and reacts to capabilities.changed events.

Best Practices

  • Use this hook to show or hide edit affordances (e.g. an "Edit" button on a channel details screen).
  • Treat the result as the single source of truth for edit permission rather than duplicating the capability check.
  • The hook returns false when capabilities are unavailable, so it is safe to render-gate on directly.

Usage

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

const canEdit = useCanEditChannel(channel);

Parameters

NameTypeRequiredDescription
channelChannelNoChannel to evaluate for edit permission.

Returns

TypeDescription
booleanWhether the current user can edit the channel.