stream-chat-react-native-core
Version:
The official React Native and Expo components for Stream Chat, a service for building chat applications
13 lines (9 loc) • 447 B
text/typescript
import { useMemo } from 'react';
import { useChatContext, useThreadContext, useTypingContext } from '../../../contexts';
import { filterTypingUsers } from '../utils/filterTypingUsers';
export const useTypingUsers = () => {
const { client } = useChatContext();
const { thread } = useThreadContext();
const { typing } = useTypingContext();
return useMemo(() => filterTypingUsers({ client, thread, typing }), [client, thread, typing]);
};