Comment Comment by danjac With Alpine if you start having anything bigger than a snippet you should pull the JS out into a component using Alpine.data()[1] which can live in a <script> tag or a JS module.[1] https://alpinejs.dev/globals/alpine-data parent danjac 3 years ago
[1] https://alpinejs.dev/globals/alpine-data