This error comes up:
[vue/require-v-for-key]
Elements in iteration expect to have 'v-bind:key' directives.
Codepen - https://codesandbox.io/s/competent-pine-8u9mt?file=/src/components/Laptops.vue:386-393
Does anybody know how to solve this error?
This error comes up:
[vue/require-v-for-key]
Elements in iteration expect to have 'v-bind:key' directives.
Codepen - https://codesandbox.io/s/competent-pine-8u9mt?file=/src/components/Laptops.vue:386-393
Does anybody know how to solve this error?
When using v-for, vue expects a unique key for each iteration. You can achieve this by binding an index key to your div element
<div v-for="(product, index) in products" :key="index">
// code to execute
</div>
:key is shorthand for v-bind:key