---
title: "Comment by Rishabh garg on \"Mastering React in 8 weeks - Day 2\" | Hashnode"
description: "Awesome blog, can you tell me What is the purpose of the key the attribute in a JSX element?"
url: "https://hashnode.com/posts/mastering-react-in-8-weeks-day-2/63a614014198b096fae992ea/comment/63a694ccb1011ed9ec6cd0e0"
---

[Discussion](https://hashnode.com/posts/mastering-react-in-8-weeks-day-2/63a614014198b096fae992ea)

Comment [Mastering React in 8 weeks - Day 2](https://hashnode.com/posts/mastering-react-in-8-weeks-day-2/63a614014198b096fae992ea)

[Rishabh garg](https://hashnode.com/@RishabhGarg1)

[Dec 24, 2022](https://hashnode.com/posts/mastering-react-in-8-weeks-day-2/63a614014198b096fae992ea/comment/63a694ccb1011ed9ec6cd0e0)

Awesome blog, can you tell me What is the purpose of the key the attribute in a JSX element?

[Prajwal Ladkat](https://hashnode.com/@prajwalladkat0805)

[Dec 24, 2022](https://hashnode.com/posts/mastering-react-in-8-weeks-day-2/63a614014198b096fae992ea/comment/63a694ccb1011ed9ec6cd0e0#reply-63a6ba67b1011ed9ec6cd78c)

I provides unique identity to each element having the key property as a prop therefore it's adviced to pass unique value to key property in React.
