Commit a843d781 authored by abkrim's avatar abkrim 😀
Browse files

Events last part video +5' not work for me

parent 57c431b0
Pipeline #479 failed with stages
in 2 minutes and 17 seconds
......@@ -7,8 +7,6 @@ use App\Models\Contact;
class HelloWorld extends Component
{
public $names = ['AbdelKarim', 'Chico', 'Man'];
public $contacts;
public function mount()
......@@ -16,11 +14,6 @@ class HelloWorld extends Component
$this->contacts = Contact::all();
}
public function refreshChildren()
{
$this->emit('refreshChildren');
}
public function render()
{
return view('livewire.hello-world');
......
......@@ -9,13 +9,6 @@ class SayHi extends Component
{
public $contact;
protected $listeners = ['refreshChildren' => 'refreshMe'];
public function refreshMe()
{
}
public function mount(Contact $contact)
{
$this->contact = $contact;
......
......@@ -9,5 +9,5 @@
{{ now() }}
<button wire:click="refreshChildren">Refresh children</button>
<button wire:click="$emit('refreshChildren)">Refresh children</button>
</div>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment