stream-chat-react
Version:
React components to create chat conversations or livestream style chat
7 lines (6 loc) • 419 B
JavaScript
import React, { createContext, useContext } from 'react';
import { Channel } from '../../components';
export const ThreadContext = createContext(undefined);
export const useThreadContext = () => useContext(ThreadContext);
export const ThreadProvider = ({ children, thread, }) => (React.createElement(ThreadContext.Provider, { value: thread },
React.createElement(Channel, { channel: thread?.channel }, children)));