79629060

Date: 2025-05-19 15:35:31
Score: 0.5
Natty:
Report link
I found a solution

1. Set wire:key inside blade loop:


@forelse($recipes as $recipe)
<div wire:key="{{ $recipe->id }}">
     <x-recipe-card :recipe="$recipe" wire:key="{{ $recipe->id }}"/>
</div>
@empty
    <p>error</p>
@endforelse

2. Set :key for livewire component in x-recipe-card:
<livewire:like-dislike :recipe="$recipe" :key="$recipe->id"/>
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Dmytro Shved