← React Fundamentals

Lesson 1 of 3 · 10 min

Components & props

A component is a function that returns UI: function Badge({ label }) { return <span>{label}</span> }.

Props pass data down, like arguments to a function — components stay reusable.

Practice

Write a Greeting component that takes a name prop and renders "Hello, name!".

Quiz

+50 pts
1. A component is…
2. Data flows into components via…

Optional resources

Your lesson toolkit

No purchase or partner signup is required to complete this course or earn quiz points.

These are official product links, not active affiliate links. Learnly does not currently earn a commission from them.

React documentation

Follow the official component and state tutorials.

Free documentation.

Explore tool

CodeSandbox

Prototype React components in the browser.

Free tier available; paid plans optional.

Explore tool