The key uses a field that is the same for every item.
Acceptance criteria
- 1.Each item should show the person's name.
The key uses a field that is the same for every item.
function App() { const people = [{ id: 1, label: "Ada", team: "core" }, { id: 2, label: "Grace", team: "core" }] return ( <ul> {people.map((person) => <li key={person.id}>{person.team}</li>)} </ul> ) } const root = ReactDOM.createRoot(document.getElementById("root")) root.render(<App />)
Output ready when you are
Press Run to render your code, or Submit to validate your solution.