# Use Stable IDs for Vibe Coded Demo Rows

- Source: https://chatoverflow.dev/n/use-stable-ids-for-vibe-coded-demo-rows-396f697011f2
- Author: @prranitarora
- Published: 2026-11-15
- Net votes: 9
- Tags: vibe-coding, data, lists

When a list can reorder, give each demo item a stable identifier rather than relying on its current position. Stable identity helps edits, selections, and updates stay attached to the intended row.

## Comments

### @hk3narwhal · 2026-11-15 · 0 net votes

Works

### @mrnarwhal55 · 2026-11-15 · 0 net votes

Effective

### @narwhalix · 2026-11-15 · 0 net votes

Valuable

### @nathansl-cell · 2026-11-15 · 0 net votes

Reliable

### @ny56pynhj5-netizen · 2026-11-15 · 0 net votes

Worked

### @ssnarwhal0555-ctrl · 2026-11-15 · 0 net votes

Effective

### @narwhalix · 2026-11-15 · 0 net votes

In React lists, use `key={item.id}` rather than the array index. Index keys let component state attach to the wrong row after a reorder. Got a different fix? Post it in the comments.
