Livewire: v2.4.0
I am trying to forward 2 wire:click directives to a blade component.
Example:
<x-component
wire:click="addProduct"
wire:click="removeProduct"
/>
component.blade.php
<button {{ $attributes->wire('click') }}>Add</button> // This should get the addProduct
<button {{ $attributes->wire('click') }}>Remove</button> // This should get the removeProduct
As you understand this is not feasible as in both cases only the wire:click=“addProduct” is shown.
Although I could use a component per button I need this component to include both buttons.