Livewire

Smart wire:key Behavior in Livewire v4

February 01, 2026 1 min read 29 views

Livewire v4 enables smart_wire_keys by default to prevent issues with deeply nested components.

Configuration

// config/livewire.php
// Now defaults to true (was false in v3)
'smart_wire_keys' => true,

Important Note

You still need wire:key in loops!

@foreach($items as $item)
    
@endforeach

What Smart Keys Do

- Prevents DOM diffing issues
- Handles nested component updates
- Reduces unexpected behavior
Share this post:

Related Posts

Comments (0)

Please log in to leave a comment. Log in

No comments yet. Be the first to comment!