ReactJS Quiz Set – 6

Question 1

Which of the following is a basic hook in react?

Cross

useReducer()
 

Cross

useMemo()
 

Cross

useCallback()
 

Tick

useContext()



Question 1-Explanation: 

useState, useEffect, and useContext are the three basic hooks in react.

Question 2

React is a ___

Cross

Frontend Framework
 

Cross

Backend Framework
 

Tick

JavaScript Library
 

Cross

JavaScript Module



Question 2-Explanation: 

React is a JavaScript library created by Facebook which is so big that sometimes it is confused with a framework

Question 3

JSX allows us to write____

Cross

BootStrap in React
 

Cross

Jquery in React
 

Tick

HTML in React
 

Cross

MongoDB in React



Question 3-Explanation: 

JSX is the main feature of react which helps us to write HTML and JavaScript in a single React file

Question 4

Which of the following statement must be written in a class component heading

Tick

extends React.Component
 

Cross

extends React

Cross

extends ReactDOM
 

Cross

extends ReactRouer



Question 4-Explanation: 

This is the basic syntax for creating class based components.

Question 5

Which of the following is the current definition of components?

Cross

Components are the HTML elements.
 

Cross

Components are the set of variables defined in ReactJS.
 

Tick

Components are independent and reusable code that return HTML elements
 

Cross

None of the above



Question 5-Explanation: 

Components are reusable which stops redundancy and save time

Question 6

How many types of components are there in react?

Cross

1
 

Tick

2
 

Cross

3
 

Cross

4



Question 6-Explanation: 

The two types of components are class based and function based components

Question 7

Which of the following is the correct definition of state?

Cross

It is a temporary storage of elements
 

Tick

It is the internal storage of components
 

Cross

It is used to know about the current state of the element
 

Cross

It is the permanent storage of elements



Question 7-Explanation: 

States are used to manage the internal data of components

Question 8

What is the correct syntax for  arrow function?

Cross

()
 

Cross

=>
 

Tick

()=>
 

Cross

>=()



Question 8-Explanation: 

Arrow function syntax was introduced in the ES6 version to write short and clean code

Question 9

What is the correct definition of prop drilling?

Tick

Concept of passing data as props through intermediate components until data is reached where it is required.
 

Cross

Concept of passing data between sibling components
 

Cross

Concept of passing data to required destination as states until data is reached where it is required
 

Cross

Concept of passing data inside the component itself



Question 9-Explanation: 

Prop drilling is used to pass data to the destination component with the help of intermediate components.

Question 10

Which technique is used in React Memo?

Cross

Hashing
 

Tick

Memoization
 

Cross

Sorting
 

Cross

Pipelining



Question 10-Explanation: 

It is a technique which caches result which helps to skip unnecessary renderings

There are 15 questions to complete.

  • Last Updated : 27 Sep, 2023

Share your thoughts in the comments
Similar Reads