Video wird geladen...
Video konnte nicht geladen werden
Running into a really weird Livewire issue — anyone have a clue where I can dig a bit deeper for a solution?
11,195 Aufrufe • vor 1 Jahr •via X (Twitter)
10 Kommentare

@LaravelLivewire Try changing :$key to wire:key="$key"

@LaravelLivewire spam wire:key on places until it works

@LaravelLivewire Try Wire:replace on the inside div I actually run into this exact problem this morning.

@LaravelLivewire Does the cart item have a single root element?

@LaravelLivewire Indeed it does

Try explicitly defining your key perhaps? :key="$item->id"

Good idea but nope, same problem.

@LaravelLivewire maybe you missed some closing tags

@LaravelLivewire wire:key on the nested/outer div might do it. The DOM diffing algorithm gets confused when encountering multiple sibling divs with similar or no attributes. I’ve been there btw and it’s not a fun place to be lol

@LaravelLivewire For better readability and to ensure no conflict, I would change $key=>$value to $name => $value or something else. Then I would add wire:key.
