AI Hints
Home›React Tutorial›Children and Defaults
React · Lesson 12 of 120

Basics Quiz

Test yourself.

⏱ 2 min read▶ Video at 8:22🎓 Free
Watch this lesson in the React courseWatch on YouTube ↗Full React course

Let's review the basics. Pause after each question, and answer before I do.

  • Basics quiz
  • Pause and think
  • Then check

Question 1

What does a component return? The UI to show, written in JSX.

Quick check
A component returns:

Question 2

How do you write the class attribute in JSX? Class name.

Quick check
In JSX, class is written:

Question 3

How do you put a variable into JSX? With curly braces.

Quick check
To show a variable:

Question 4

Which prop holds the content between a component's tags? Children.

Quick check
Content between tags arrives as:

Summary

Well done. Next, a new section on rendering, starting with lists.

Key takeaways
  • JSX
  • className
  • children
Next up: Rendering Lists — map