Whenever I attempt to show a list from an array of data, I encounter the following error message:
cannot read property 'name' of undefined
.
HTML
<div id="list">
<myitems v-for="item in list" v-bind:my="item">
</div>
JavaScript
In my JavaScript code snippet, I define a Vue component called 'myitems' with a prop of 'my', and a template that displays information related to each item.
Next, I create a new instance of the 'myitems' component and pass in an array of objects containing name and age properties. However, when attempting to mount the component onto the element with the id 'list', the aforementioned error occurs.
I suspect that there may be an issue with how I am iterating over the items using 'v-for' and binding them to the 'my' prop. Any suggestions on what steps to take next would be greatly appreciated.