AlpineJS usage? #5086
Answered
by
mitchellholzmann
mitchellholzmann
asked this question in
Q&A
-
So with v6 I was using Alpine (and laravel blade components) to create sliders on the fly like this. <div x-data="{ swiper: null }" x-init="swiper = new Swiper($refs.container, {{ $jsonOptions() }})">
<div class="swiper" x-ref="container">
<div class="swiper-wrapper">
{{ $slot }}
</div>
</div>
</div> Now I updated to v7 today and imported it with Webpack (Laravel Mix) perfectly fine and I can access swiper in the console, but my alpinejs component no longer seems to work. No error or anything. Any clue what is going on? |
Beta Was this translation helpful? Give feedback.
Answered by
mitchellholzmann
Oct 13, 2021
Replies: 1 comment
-
Nevermind, seems like I also updated to AlpineJS 3+, which changed a lot. Switching back to v2 and it works perfectly fine again. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mitchellholzmann
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nevermind, seems like I also updated to AlpineJS 3+, which changed a lot. Switching back to v2 and it works perfectly fine again.