---
title: "Discussion on \"Do Not Use Index As A Key\" | Hashnode"
description: "Discussion on \"Do Not Use Index As A Key\". A key is a unique and permanent property that allows you to identify changed, updated, or deleted items from a list of elements. In React anything that you are returning from inside the map () function must have a key.\nconst mappedFruit = fruits.map(..."
url: "https://hashnode.com/posts/do-not-use-index-as-a-key/6515959792048cd61fddef65"
---

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

Discussion

# [Do Not Use Index As A Key](https://shawnway210.hashnode.dev/do-not-use-index-as-a-key?utm_source=hashnode&utm_medium=feed)

A key is a unique and permanent property that allows you to identify changed, updated, or deleted items from a list of elements. In React anything that you are returning from inside the map () function must have a key. const mappedFruit = fruits.map(...

Sep 28, 2023 · 2 min read · shawnway210.hashnode.dev  
Updated Sep 29, 2023  
Read the article

-   [#key](https://hashnode.com/tag/key)
-   [#index](https://hashnode.com/tag/index)
-   [#mapping](https://hashnode.com/tag/mapping)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Shawn Conway](https://hashnode.com/@shawnway210)

@shawnway210

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

software engineer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
