REACT JS QUIZ
1 .
What is the name of the tool used to take JSX and turn it into createElement calls?

Correct Answer : Option (D)

Babel
  Show Answer
2 .
React Lifecycle method static getDerivedSateFromProps(props , state) is called when ____

Correct Answer : Option (C)

Both of above
  Show Answer
3 .
Keys are given to a list of elements in react. These keys should be 

Correct Answer : Option (B)

Unique among the siblings only
  Show Answer
4 .
For uncontrolled components in react

Correct Answer : Option (A)

Source of truth is DOM
  Show Answer
5 .
Why might you use useReducer over useState in a React component?

Correct Answer : Option (B)

when you want to replace Redux
  Show Answer
6 .
Which props from the props object is available to the component with the following syntax?

<Message {...props} />

Correct Answer : Option (D)

all of them
  Show Answer
7 .
Consider the following code from React Router. What do you call :id in the path prop?

<Route path="/:id" />

Correct Answer : Option (B)

This is a route parameter
  Show Answer
8 .
What does this React element look like given the following function?

React.createElement('h1', null, "What's happening?");‚Äč

Correct Answer : Option (A)

<h1>What's happening?</h1>
  Show Answer
9 .
What property do you need to add to the Suspense component in order to display a spinner or loading state?
function MyComponent() {
  return (
    <Suspense>
      <div>
        <Message />
      </div>
    </Suspense>
  );
}

Correct Answer : Option (C)

fallback
  Show Answer
10 .
Which of the following is a correct definition of state in react?
 
a) A persistent storage
 
b) An internal data store (object) of component

Correct Answer : Option (B)

b
  Show Answer