Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

AtomCoder's avatar

Livewire 3 - $this->emit Not Working

Hi Guys,

Just noticed in Livewire 3, I've been trying to refresh the page using $this->emit('refresh'), but for some reason its not working as expected.

Error Received: Method App\Livewire\AddUser::emit does not exist.

Anyone any ideas?

0 likes
7 replies
thinkverse's avatar

You might want to read the upgrade guide or the documentation for Livewire v3 events, the method has been changed from emit and dispatchBrowserEvent to dispatch:

// Livewire v2
$this->emit('refresh');

// Livewire v3
$this->dispatch('refresh');
11 likes
AtomCoder's avatar

@thinkverse Thanks for the reply.

However, $this->dispatch('refresh'); still doesnt refresh the page/component.

1 like
AtomCoder's avatar

@Snapey

No, not specifically. V2 livewire allowed us to use $this->emit('refresh'); and tie it to a listener in order to refresh the component. It was convienient.

V3 seems to be using $this->dispatch('refresh');, but I'm not sure how the component is refreshed?

2 likes
nexxai's avatar

@AtomCoder dispatching just dispatches a generic event, in your case, one called refresh. It's up to you to write the logic to do whatever you need it to do (in this case, perform some kind of refresh, I assume).

ataub2qf's avatar

@AtomCoder what worked for me was just to add something like this in my Component php

protected $listeners = ['contact-added' => '$refresh'];

Then Livewire.dispatch('contact-added') triggered a refresh

2 likes
earl's avatar

Can I downgrade mylaravel livewire versin to 2?

Please or to participate in this conversation.