---
title: "Discussion on \"How & Why to use the `:key` attribute in VueJS v-for loops\" | Hashnode"
description: "Discussion on \"How & Why to use the `:key` attribute in VueJS v-for loops\". When developing in VueJS, you might have realized that you should use the :key attribute in the v-for loops. You also might have ended up with a linter like ESLint screaming at you, stating you should always use the :key attribute with v-for.\nSo you ..."
url: "https://hashnode.com/posts/how-and-why-to-use-the-key-attribute-in-vuejs-v-for-loops/60254089c6d91052dafe8856"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How & Why to use the \`:key\` attribute in VueJS v-for loops](https://codelistic.hashnode.dev/how-and-why-to-use-the-key-attribute-in-vuejs-v-for-loops?utm_source=hashnode&utm_medium=feed)

When developing in VueJS, you might have realized that you should use the :key attribute in the v-for loops. You also might have ended up with a linter like ESLint screaming at you, stating you should always use the :key attribute with v-for. So you ...

Feb 11, 2021 · 6 min read · codelistic.hashnode.dev  
Updated Jan 8, 2022  
Read the article

-   [#vuejs](https://hashnode.com/tag/vuejs)
-   [#templates](https://hashnode.com/tag/templates)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#dom](https://hashnode.com/tag/dom)

## Written by

[Marko Burazin](https://hashnode.com/@mburazin)

@mburazin · Stockholm, Sweden

  
[View profile](https://hashnode.com/@mburazin)

Full-stack Web Developer

## Responses 1

Markdown supported · ⌘↵ to post

[Thoby Victor](https://hashnode.com/@thobyv)

[Feb 13, 2021](https://hashnode.com/posts/how-and-why-to-use-the-key-attribute-in-vuejs-v-for-loops/60254089c6d91052dafe8856/comment/6027fcc74f6b4462941e090b)

Awesome read.

[Marko Burazin](https://hashnode.com/@mburazin)

[Feb 13, 2021](https://hashnode.com/posts/how-and-why-to-use-the-key-attribute-in-vuejs-v-for-loops/60254089c6d91052dafe8856/comment/6027fcc74f6b4462941e090b#reply-60280935e522c1626f3724c7)

Thanks for reading! Glad you found it useful.
