@microsoft/mgt-chat
Version:
Chat component for providing Teams conversations via a React component built using the ACS UI library
10 lines (7 loc) • 329 B
text/typescript
import { useState } from 'react';
import { StatefulGraphChatClient } from './StatefulGraphChatClient';
export const useGraphChatClient = (chatId: string): StatefulGraphChatClient => {
const [chatClient] = useState<StatefulGraphChatClient>(new StatefulGraphChatClient());
chatClient.chatId = chatId;
return chatClient;
};