Uploading content
This commit is contained in:
14
resources/views/livewire/test/child-component.blade.php
Normal file
14
resources/views/livewire/test/child-component.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<div>
|
||||
You id is {{ $id }}
|
||||
<button wire:click ="doSome">Hit child</button>
|
||||
</div>
|
||||
|
||||
@script
|
||||
<script>
|
||||
// After the first "Hit parent" this will gives youn the error of no component found
|
||||
// due the lack of hability of livewire to track correctly the previous component events
|
||||
@this.on('did', () => {
|
||||
alert('did it')
|
||||
})
|
||||
</script>
|
||||
@endscript
|
||||
4
resources/views/livewire/test/parent-component.blade.php
Normal file
4
resources/views/livewire/test/parent-component.blade.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
<button wire:click = "counting">Hit parent</button>
|
||||
<livewire:test.child-component :id="$count" :key="$count">
|
||||
</div>
|
||||
Reference in New Issue
Block a user