import { useEffect } from 'react';
import { useAwaitMessageBroker } from '../useAwaitMessageBroker';
export const useMessageBroker = (callback) => {
    const mb = useAwaitMessageBroker();
    useEffect(() => {
        if (!mb) {
            return;
        }
        return mb.subscribe(callback);
    }, [callback, mb]);
};
//# sourceMappingURL=useMessageBroker.js.map