Answers for "share data between livewire and alpine js"

0

passing livewire variable in alpine js

You can share data between livewire and apline js using : @entangle

class Counter extends Component
{
    public $showDropdown = false;
}

<div x-data="{ open: @entangle('showDropdown') }">
Posted by: Guest on October-13-2020
0

share data between livewire and alpine js

You can share data between livewire and apline js using : @entangle

class Counter extends Component
{
    public $showDropdown = false;
}

<div x-data="{ open: @entangle('showDropdown') }">
--------------- OR -----------------
<div x-data="{ open: @entangle('showDropdown').defer }">
  
With this you dont need to use wire model with that data Like
wire:model.defer="showDropdown"
Posted by: Guest on October-13-2020
0

Sharing State Between Livewire And Alpine

You can sharing variable between livewire and alpine using : @entangle

class Counter extends Component
{
    public $showDropdown = false;
}

<div x-data="{ open: @entangle('showDropdown') }">
Posted by: Guest on October-13-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language