5 hands-on exercises and 5 find-the-bug challenges for the Passing Props lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Pass a label prop and render it.
Numbers need braces, not quotes.
Render a person's name and role from two props.
Use a default so the component works when the prop is omitted.
Pass a whole object and read two fields from it.
The parameter is the whole props object, so the field must be read from it.
A quoted number is text, so the arithmetic concatenates.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspaceThe name sent and the name read must match exactly.
A default only fills in for undefined, so an empty string wins.
Props are read-only, so build a new value from the prop instead.