I am trying to bind some mock data saved in a variable called whatsHappeningItems that I have in my script as a ref to send into a card component I have. When I do the v-for="whatsHappening in whatsHappeningItems" as shown:
I get this error message:
[vue/valid-v-for] Custom elements in iteration require ‘v-bind:key’ directives.const whatsHappening: {
title: string;
count: string;
}
Anyone know why this is happening?
2
Answers
Seems like it is a eslint issue as stated by Tachibana Shin
I wrote:
And my mock data looks like this:
all errors were removed so it seems to have fixed the issue.
it’s
eslint
add something like this