Unable to call component method. Public method [$emit] not found on component #8435
Replies: 2 comments
-
@theoreaves emit doesn't exist in V3, that is a V2 method name. It has been renamed to dispatch. See here for more details https://livewire.laravel.com/docs/upgrading#events |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I just installed a fresh version of laravel (no starter kits). I added tailwindcss, then added livewire 3.
All is working, I can do a livewire form submit with no issue, however, I get this error when I do a "$wire.emit" command:
Unable to call component method. Public method [$emit] not found on component
here is a flair for the full error:
https://flareapp.io/share/353gjgE5
Here is my app.blade:
and here is my component's blade:
{{-- @click="$wire.emit('goTo', {{ $connection->id }})"--}}
wire:click="$emit('goTo', {{ $connection->id }})"
>GO
@Endforeach
I've tried wire:click and @click. Both give me the same error.
Beta Was this translation helpful? Give feedback.
All reactions