'Alpine doesn't work for me on IOS (Safari and chrome)
I have a project with the TALL stack without any extra dependencies, it runs perfectly on Android and Windows, on chrome and edge. But in IOS, Safari or chrome alpine doesn't work for me at all... Any suggestions?
In app layout
<script src="//unpkg.com/alpinejs" defer></script>
@livewireStyles
-- Content
@livewireScripts
Ej. Menu Alpine
<div x-data="{menu:false}">
...
<button type="button" x-on:click="menu=!menu" >
...
<div x-cloak x-show="menu" >
...
The website is [https://yavoycuba.com]
Solution 1:[1]
What is your indication that Alpine "doesn't work" on Chrome/Safari? I just dropped a basic component into the HTML in Chrome and it worked as expected.
It would have been best to indicate this is regarding Livewire in your question title as Livewire !== Alpine.
If you are sharing state between Livewire components and Alpine frontend state, you need to use Livewire's @entangle and/or @js if you're outputting PHP for Alpine. https://laravel-livewire.com/docs/2.x/alpine-js#sharing-state
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | James0r |