5 hands-on exercises and 5 find-the-bug challenges for the What Is React lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Write a component that renders an h2 saying Hello React, and render it.
Render a component containing a paragraph with the text Ready to build.
Write two components and render both inside a div.
Declare a constant and display it inside a component with braces.
Render a Badge component inside a Card component.
JSX treats a lowercase tag as an HTML element, so the component never runs.
The component is defined but never handed to the root.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspaceCalling a component inlines its result instead of creating an element React manages.
Without braces the variable name is printed literally.
createRoot was given an element that does not exist, so nothing appears.