Level 122
where are wire:key ?
1 like
Hello
Problem description:
In my RecipeList.php I am showing the list of recipes:
@forelse($recipes as $recipe)
<x-recipe-card :recipe="$recipe"/>
@empty
<p>error</p>
@endforelse
Inside <x-recipe-card :recipe="$recipe"/> I have another livewire component:
<livewire:like-dislike :recipe="$recipe"/>
Upon the initial page load, the like buttons are displayed correctly on all cards. However, as soon as I change the sorting ($sort) within the same parent component, RecipeList, the buttons only remain on the first recipe, while they disappear from all subsequent ones.
Sequence Of Steps:
Conclusion:
How can i make the parent component RecipeList.php be able to track the child LikeDislike.php provided that it is in the blade component
Please or to participate in this conversation.