Lesson 1.X

React Core Concepts

Testing your knowledge of React internals is one of the best ways to solidify your understanding of how the library actually works under the hood. Below are four questions ranging from basic terminology to the specific mechanics of the React runtime.

How many can you get right?

1

Question 1: What is this called?

What is this called?

jsx
<Icon />
Select the correct answer:

A) A component

B) An element

C) A function invocation

D) A component instance

2

Question 2: Why does React use an object representation of the DOM?

Why does React use an object representation of the DOM?

Select all that apply:

Objects are lightweight and easy to create and destroy

To easily compare the current element with the previously rendered element

In order to only update the DOM nodes that have changed

To avoid wiping out and recreating the entire DOM tree

3

Question 3: What does jsx() from react/jsx-runtime do?

What does jsx() from react/jsx-runtime do?

Select the correct answer:

A) It creates a React Component instance

B) It creates a React Element

C) It creates a React Component class

4

Question 4: What is a React Component?

What is a React Component?

Select the correct answer:

A) A function that can accept input and returns a React Element

B) A function that can accept input and returns a React Component

C) A function that can accept input and returns a React Component instance

D) A function that can accept input and returns a React Component class