Level 6
Since Livewire 4 SFCs use an anonymous class format, listeners need to be defined inside the class definition, typically using the #[On] attribute. If you are dispatching from Blade via wire:click="$dispatch('your-event')" or $this->dispatch(), the receiving SFC needs to look like this
1 like