Setting up a "scripts" stack
@stack('scripts') inside your Blade layout file.
... @livewireScripts @stack('scripts') </body>
Pushing to the scripts stack
Now, from your component's Blade view, you can push to the
@this blade directive in your component's view.
Here's an example: