Answers for "detect livewire is loading in javascript"

0

detect livewire is loading in javascript

window.livewireLoading = false;

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

    Livewire.hook('message.processed', (message, component) => {
        livewireLoading = false;
    })
});
Posted by: Guest on June-02-2021

Code answers related to "detect livewire is loading in javascript"

Browse Popular Code Answers by Language