freeCodeCamp/guide/english/certifications/front-end-libraries/react/give-sibling-elements-a-uni.../index.md

16 lines
486 B
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: Give Sibling Elements a Unique Key Attribute
---
## Give Sibling Elements a Unique Key Attribute
## Hint
It is just almost same as previous [challenge](https://learn.freecodecamp.org/front-end-libraries/react/use-array-map-to-dynamically-render-elements). Just you need to add `key` attribute.
## Solution
Just add `key` attribute to the `<li>` tag to make unique
```react.js
const renderFrameworks = frontEndFrameworks.map((item) =>
<li key={item+1}>{item}</li>
);
```