Quiz: An Empty Menu
The menu should list three drinks, but the items are empty, with just a € in each, and the console says [Vue warn]: Invalid prop: type check failed for prop "item". Expected Object, got String with value "item". Look at MenuItem.vue too, then click the line with the mistake in App.vue.
1<script setup>
2import MenuItem from "./MenuItem.vue";
3
4const menu = [
5 { id: 1, name: "Espresso", price: 2 },
6 { id: 2, name: "Cappuccino", price: 3 },
7 { id: 3, name: "Green Tea", price: 3 },
8];
9</script>
10
11<template>
12 <h1>Corner Café</h1>
13 <ul class="menu">
14 <MenuItem v-for="item in menu" :key="item.id" item="item" />
15 </ul>
16</template>