1You can share data between livewire and apline js using : @entangle
2
3class Counter extends Component
4{
5 public $showDropdown = false;
6}
7
8<div x-data="{ open: @entangle('showDropdown') }">
9--------------- OR -----------------
10<div x-data="{ open: @entangle('showDropdown').defer }">
11
12With this you dont need to use wire model with that data Like
13wire:model.defer="showDropdown"
1You can share data between livewire and apline js using : @entangle
2
3class Counter extends Component
4{
5 public $showDropdown = false;
6}
7
8<div x-data="{ open: @entangle('showDropdown') }">
1You can sharing variable between livewire and alpine using : @entangle
2
3class Counter extends Component
4{
5 public $showDropdown = false;
6}
7
8<div x-data="{ open: @entangle('showDropdown') }">