React.js Quiz | Set-2

Last Updated :
Discuss
Comments

Question 1

Which of the following is used to increase the performance of the React.js ?
  • Virtual DOM
  • Original DOM
  • Shallow DOM
  • Both of the above

Question 2

Which of the following is the class-based component in React.js ?
  • class
  • factory
  • render
  • props

Question 3

Which of the following is true about the below syntax ?
disabled = {false} 
  • rendered as disabled
  • rendered at all
  • rendered as enabled
  • All of the above

Question 4

Which of the below category does react events come from ?

  • Destruction

  • Initialization

  • State/Property Updates

  • All of the above

Question 5

Which of the following is a way in which data get handled in React ?

  • state

  • props

  • model

  • A and B

Question 6

What is the output of the below code ?
var Geeks=(props)=>
{
 return(
 
DSA Course 1
DSA Course 2
); } ReactDOM.render(<DSA Course/>,mountNode)
  • DSA Course 1
  • DSA Course 2
  • DSA Course 1 DSA Course 2
  • Error

Question 7

Which of the following is called a message that is closed inside the curly braces?
const messages="Hii Geeks";
const element =<p>{messages}<p>
  • JS Function
  • JS Element
  • JS Expression
  • JSX Wrapper

Question 8

Which below hooks in React js allows to directly create a reference to the DOM element ?
  • useHook
  • useState
  • useEffect
  • useRef

Question 9

Which of the following is the correct output of the below code. If a component is called Geeks and is rendered to another Dom which element will be rendered ?
function Geeks(){

return <h1> geeks For geeks </h1>
ReactDOM.render(,document.getElementById('root'));

}
  • div
  • section
  • h1
  • component

Question 10

Which of the below methods is used to render react content on an HTML page ?
  • React.mount()
  • ReactDOM.start()
  • ReactDOM.render()
  • React.render()

There are 15 questions to complete.

Take a part in the ongoing discussion