Detect LiveWire se está cargando en JavaScript

window.livewireLoading = false;

document.addEventListener("DOMContentLoaded", () => {
    Livewire.hook('message.sent', (message, component) => {
        livewireLoading = true;
    })

    Livewire.hook('message.processed', (message, component) => {
        livewireLoading = false;
    })
});
Energetic Elk