TypingContext

TypingContext is provided by Channel. If you are not familiar with the React Context API, see the React docs.

Best Practices

  • Use useTypingContext for consistent access and typings.
  • Treat typing as read-only UI state.
  • Avoid heavy computations on the typing map during render.
  • Consider disabling typing indicators in high-volume channels.
  • Keep typing UI subtle and non-intrusive.

Basic Usage

Consume TypingContext in any child of Channel:

import { useContext } from "react";
import { TypingContext } from "stream-chat-react-native";

const { typing } = useContext(TypingContext);

Alternatively, use the useTypingContext hook.

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

const { typing } = useTypingContext();

Value

typing

A map of typing.start event objects keyed by user ID, for users currently typing.

Type
object