CodeClass

AI

Lesson player ready

React Props: Pass Data Into Components

Use the full player for card-by-card progress, hints, and checkpoints.

Lesson 3 of 4+40 XP

React Props: Pass Data Into Components

Concept

What are props?

Props are values you pass into a component. They let one component reuse different data.

Example

Here, name and level are props.

PlayerCard.jsx
1
2
3
function PlayerCard({ name, level }) {
return <p>{name} - Level {level}</p>
}
Mini Quiz

What do props help with?

Correct! Props pass data into components. +10 XP

Your turn · Practice

Create a PlayerCard that shows a player name and level.