I'm new to front end development and am experimenting with learning Vue.js. Suppose I have an array
fruits = ["New York", "Chicago", "London"]
and I have a component named FruitPrices which can work like:
<FruitPrices fruit="London"></FruitPrices>
I was wondering would it be possible to use v-if to create multiple components? Something along the lines of:
<div v-for="item in fruits" : key="item">
<FruitPrices fruit="item"></FruitPrices>
</div>
This code does not work so I was wondering if anyone experienced with Vue can lend me a helping hand!