stream-chat-react
Version:
React components to create chat conversations or livestream style chat
11 lines (10 loc) • 521 B
JavaScript
import React, { createContext, useContext } from 'react';
export const SearchSourceResultsContext = createContext(undefined);
/**
* Context provider for components rendered within the `SearchSourceResults`
*/
export const SearchSourceResultsContextProvider = ({ children, value, }) => (React.createElement(SearchSourceResultsContext.Provider, { value: value }, children));
export const useSearchSourceResultsContext = () => {
const contextValue = useContext(SearchSourceResultsContext);
return contextValue;
};