How do these Livewire.hook 's work?

What seems to be the problem:

These hooks sound great. Because I want to focus an element after Livewire rerendered it.

!

Here very down under
But I can not figure out, how to do this:

document.addEventListener("livewire:load", () => {
        Livewire.hook('select.updating', (fromEl, toEl, component) => {})
});

This did not work. He sais: unknown hook. I tried many things.

Also I find no examples for this in the internet.

Do someone has experience with that?

your scripts are below @livewireScripts ?

Yes, of course.

I found the solution. Now it works. Thank you for trying to help.

       <script>
            document.addEventListener("livewire:load", () => {
                Livewire.hook('message.processed', (message, component) => {

                    if (message.updateQueue[0].method === 'add{{ucfirst($modelName)}}') {
                        document.getElementById('{{$this->id}}_textInput').focus();
                    }
                })
            });
        </script>