Services Work Learn About Contact
0/10
Lesson 7 of 10

Lists & Keys

Render lists in React using map(). Each item in a list needs a unique key prop so React can track which items changed. Keys should be stable identifiers, not array indices if possible.

REACT
function FruitList() {
  const fruits = ["apple", "banana", "cherry"];

  return (
    <ul>
      {fruits.map((fruit) => (
        <li key={fruit}>{fruit}</li>
      ))}
    </ul>
  );
}
🧠

Quick Quiz

Answer correctly to unlock the next lesson.

Support the mission

This learning platform is 100% free: no ads, no tracking, no paywalls. If it helped you learn something useful, you can support future lessons or donate to Doctors Without Borders, which provides emergency medical care in crisis zones worldwide.

🎉

You completed React!

You finished all 10 lessons and quizzes. You now know the basics of React.