Skip to content
Free since 2014. Built for the engineers who keep things running.

cat /articles/wirekey-and-the-row-that-kept-the-wrong-data.md

Laravel

wire:key and the Row That Kept the Wrong Data

Steven Richardson looks at how missing or unstable wire:key values can cause Livewire lists to show the wrong Alpine state or stale child component data after rows are deleted or reordered. He also covers stable key naming and the limits of server-side tests.

freek.dev16 Nov 2026 · 1 min read · summary

article --summary

The summary

The article starts from a common Livewire problem: when rows in a list lack a proper wire:key, or the key changes between renders, deleting or reordering an item can leave the wrong client-side state attached to the wrong row. Nested components can end up holding stale data for the same reason. Richardson walks through choosing stable keys based on record identity rather than position, and shows how to prefix keys for rows and child components so they do not collide. The examples focus on keeping Alpine state and nested component data tied to the correct item. He closes by explaining what server-side tests can confirm about rendered output and what they cannot, since the bug lives in how the browser patches the DOM. Readers who maintain Livewire lists will find it useful for both the fix and the testing strategy.

Editorial note: This is a summary of an article first published by freek.dev. The full piece is on their site.

Reading now

Topic
Laravel
Source
freek.dev
Published
16 Nov 2026
Format
Curated summary

Have a take on this?

Write it up and submit it. It goes on the list once an editor approves it.

Submit an article

articles --latest

Latest articles

New from the blogs we follow and the community.

All articles

newsletter --weekly

LaraChat Weekly, minus the noise.

The best reads, new jobs and upcoming events, in one email a week.