UNPKG

stream-chat-react

Version:

React components to create chat conversations or livestream style chat

10 lines (9 loc) 311 B
import { useMemo } from 'react'; export var useCreateTypingContext = function (value) { var typing = value.typing; var typingValue = Object.keys(typing || {}).join(); var typingContext = useMemo(function () { return ({ typing: typing, }); }, [typingValue]); return typingContext; };