All rules

Sheath rule

blade-livewire-loop-key-integrity

Livewire loop identities must vary with the current iteration.
Package
Core
Category
Blade
Default severity
error by default
Auto-fix
Manual fix

#Why

Constant wire:key, bound wire:key, and wire:sort:item values inside Blade loops cause morphing and sorting collisions. Repeated Livewire output needs an identity derived from the current item or index.

Static values outside loops are accepted. Conditional Blade paths and x-ignore boundaries are checked independently. wire:key is checked on Livewire component tags, while ordinary Blade component attributes are outside scope because their rendered output is not known.

#Examples

Inside @foreach, prefer wire:key="post-{{ $post->id }}" over a shared literal such as wire:key="post".