useChannelTypingState

Tracks users currently typing in a channel for preview rendering.

Best Practices

  • Use this hook for typing badges in ChannelList rows.
  • Ignore self-typing in previews to reduce visual noise.
  • Keep typing text concise for small row layouts.
  • Prefer memoized row components when displaying typing users.
  • Handle zero typers as the default state.

Usage

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

const TypingPreview = ({ channel }: { channel: Channel }) => {
  const { usersTyping } = useChannelTypingState({ channel });

  if (!usersTyping.length) return null;
  return (
    <Text>{`${usersTyping[0].name ?? usersTyping[0].id} is typing...`}</Text>
  );
};

Parameters

Name Type Required Description
channel Channel Yes Channel to subscribe to typing events for.

Returns

Name Type Description
usersTyping UserResponse[] Current list of users typing in this channel.
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>