useIsChannelPinned

Returns whether the current user has pinned the channel and keeps it in sync with member.updated events.

Best Practices

  • Use this hook instead of reading channel.state.membership.pinned_at directly in render.
  • Read the returned boolean for badge and ordering decisions.
  • Keep pinned indicators subtle and consistent across channel previews.
  • Avoid duplicating membership event listeners in custom list components.
  • Handle the default unpinned state while initial membership data is syncing.

Usage

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

const PinnedIndicator = ({ channel }: { channel: Channel }) => {
  const pinned = useIsChannelPinned(channel);
  return pinned ? <Text>Pinned</Text> : null;
};

Parameters

Name Type Required Description
channel Channel Yes Channel whose pinned status is observed.

Returns

Type Description
boolean Whether the channel is currently pinned.
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>