Skip to content

W0102: A live list's items have no key ​

A loop in a live component's markup makes items with no key. A patch then matches the old and new items by position: removing the first one changes every item after it, and moves their state (focus, what is typed, a nested component's instance) to the wrong row. Reported by vukavet.

Wrong ​

html
for _, o := range Orders {
  <li>{o.Ref}</li>
}
html
for _, o := range Orders {
  <li key={o.ID}>{o.Ref}</li>
}

Released under the MIT License. Vuka builds on Go and its tools, which are made by the Go Authors. Vuka is not affiliated with Google or the Go project. Go is a trademark of Google LLC.