Skip to content
Discussion options

You must be logged in to vote

You need a unique key on your template tag (https://alpinejs.dev/directives/for#keys).
Do not use index because it's important that the key identifies the same element on each iteration.
In your example, it would be <template x-for="(item, index) in items" :key="item.name">

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SeanBerce
Comment options

Answer selected by SeanBerce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants