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?
Question 1: What is this called?
What is this called?
<Icon />A) A component
B) An element
C) A function invocation
D) A component instance
Question 2: Why does React use an object representation of the DOM?
Why does React use an object representation of the DOM?
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
Question 3: What does jsx() from react/jsx-runtime do?
What does jsx() from react/jsx-runtime do?
A) It creates a React Component instance
B) It creates a React Element
C) It creates a React Component class
Question 4: What is a React Component?
What is a React Component?
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