• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
Switch to Dark Mode

React.js Quiz | Set-2

Last Updated : Apr 2, 2024
Discuss
Comments

Question 1

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

Question 2

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

Question 3

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

Question 4

Which of the below category does react events come from ?

  • A

    Destruction

  • B

    Initialization

  • C

    State/Property Updates

  • D

    All of the above

Question 5

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

  • A

    state

  • B

    props

  • C

    model

  • D

    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)
  • A
    DSA Course 1
  • B
    DSA Course 2
  • C
    DSA Course 1 DSA Course 2
  • D
    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>
  • A
    JS Function
  • B
    JS Element
  • C
    JS Expression
  • D
    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'));

}
  • A
    div
  • B
    section
  • C
    h1
  • D
    component

Question 10

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

Ready to go from coding beginner to development pro? Our DSA to Development Coding Guide has everything you need to crush coding interviews and ace real-world projects! Limited spots available!
Enroll Now and Transform Your Coding Skills! Also get 90% fee refund on completing 90% of the course in 90 days! Take the Three 90 Challenge today.

There are 15 questions to complete.

Take a part in the ongoing discussion