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

React.js Quiz | Set-1

Last Updated : Apr 2, 2024
Discuss
Comments

Question 1

Which of the following command is used to create react-js-app ?
  • A
    npx create-react-app appname
  • B
    npm install create-react-app
  • C
    npx install create-react-app -g
  • D
    install - l create-react-app

Question 2

In React.js which one of the following is used to create a class for Inheritance ?
  • A
    Create
  • B
    Extends
  • C
    Inherits
  • D
    Delete

Question 3

What is the default port number in which the application run ?
  • A
    3000
  • B
    8080
  • C
    5000
  • D
    3030

Question 4

Which of the following valid component return type of React ?
  • A
    2
  • B
    5
  • C
    1
  • D
    3

Question 5

Which of the following is a way to handle data in React.js ?
  • A
    State & Props
  • B
    Services & Components
  • C
    State & Services
  • D
    State & Component

Question 6

Which of the following is must for the API in React.js ?
  • A
    SetinitialComponent
  • B
    renderComponent
  • C
    render
  • D
    All of the above

Question 7

Which of the following is true regarding Babel ?
  • A
    Compiler
  • B
    Transpilar
  • C
    Both of the above
  • D
    None of the above

Question 8

In React.js, how we can pass the data from one component to another in React.js ?
  • A
    SetState
  • B
    Render with arguments
  • C
    Props
  • D
    PropTypes

Question 9

Which of the following function is true about changing the state in React.js ?
  • A
    this.State{}
  • B
    this.setState
  • C
    this.setChangeState
  • D
    All of the above

Question 10

Which of the following method is true about referring parent class in React.js ?
  • A
    self()
  • B
    inherits()
  • C
    this()
  • D
    super()

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