stream-chat-react
Version:
React components to create chat conversations or livestream style chat
11 lines (10 loc) • 363 B
JavaScript
import { useChatContext } from '../../../context';
import { useStateStore } from '../../../store';
const selector = (state) => ({
notifications: state.notifications,
});
export const useNotifications = () => {
const { client } = useChatContext();
const result = useStateStore(client.notifications.store, selector);
return result.notifications;
};