Hi,
I am trying to use the JavaScript Proxy ($wire) with live and alpine.js.
I managed to retrieve the property cities in my livewire component with $wire.get(‘cities’):
public $cities = [
[
“id” => 1,
“fullname” => “Ábelová”,
“shortname” => “Ábelová”,
“zip” => “98513”,
“district_id” => 33,
“region_id” => 1,
“use” => 1,
“latitude” => “48.4108169”,
“longitude” => “19.4317411”,
“slug” => “abelova”,
“created_at” => null,
“updated_at” => null,
]];
I am trying to set the property in alpine but i get always the error "Cannot read property $wire of undefined:
Do I have to create setter in the component or do you have any idea why I cant read the property?