//
// Copyright 2023 DXOS.org
//
import { useMemo } from 'react';
import { useDevtools } from '@dxos/react-client/devtools';
export const useSignal = () => {
    const devtoolsHost = useDevtools();
    const signalResponses = useMemo(() => {
        const signalOutput = devtoolsHost.subscribeToSignal();
        const signalResponses = [];
        signalOutput.subscribe((response) => {
            signalResponses.push(response);
            return [...signalResponses];
        });
    }, []);
    return signalResponses;
};
//# sourceMappingURL=useSignal.js.map