v-for renders a list of elements by iterating over an array (or object/range). You should always pair it with a unique :key so Vue can track items efficiently.
<script setup>
import { ref } from "vue";
const items = ref([{ id: 1, name: "Apple" }, { id: 2, name: "Banana" }]);
</script>
<template>
<ul>
<li v-for="item in items" :key="item.id">{{ item.name }}</li>
</ul>
</template>
