Me pregunto si hay una forma de usar la propiedad mágica $ nextTick AlpineJS en un script javascript (el "$ nextTick" no se reconoce):
<div x-data="{ app() }"> <button @click="updateContent" x-text="title" ></button> </div> ... <script src="{{ asset('js/my_script.js') }}"></script>mi_script.js:
function app() { return { title: 'Hello', updateContent: function() { title = 'Hello World!'; // $nextTick(() => { console.log($el.innerText) }); // $ is not recognize } } }