0% found this document useful (0 votes)
10 views8 pages

CH1 Ett

Uploaded by

aatifnizami123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views8 pages

CH1 Ett

Uploaded by

aatifnizami123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

1. What is React?

a. A JavaScript library for building user interfaces

b. A programming language for building websites

c. A framework for building mobile apps

d. A database management system

Answer: a. A JavaScript library for building user interfaces

2. Which of the following is not a feature of React?

a. Virtual DOM b. JSX c. AngularJS

d. React Router

Answer: c. AngularJS

3. What is JSX?
a. A JavaScript library for building user interfaces

b. A syntax extension for JavaScript

c. A programming language for building websites

d. A framework for building mobile apps

Answer: b. A syntax extension for JavaScript

4. What is the purpose of the virtual DOM in React?

a. To store the state of the application

b. To manage the DOM elements

c. To improve the performance of the application

d. To handle user input

Answer: c. To improve the performance of the application


5. Which of the following is not a built-in component in React?

b.

c.
d. Answer: a.

6. What is React Router?

a. A library for handling user input

b. A library for building forms

c. A library for handling routing in React applications

d. A library for managing state in React applications Answer:

c. A library for handling routing in React applications

7. What is the difference between props and state in React?


a. Props are used for handling user input, while state is used for storing the state of the application

b. Props are used for storing the state of the application, while state is used for handling user input

c. Props are a one-way data flow, while state is a two-way data flow

d. Props are a two-way data flow, while state is a one-way data flow

Answer: c. Props are a one-way data flow, while state is a two-way data flow

8. What is a callback function in React?

a. A function that is passed as an argument to another function

b. A function that is returned by another function

c. A function that is used to handle user input

d. A function that is used to manage the DOM elements

Answer: a. A function that is passed as an argument to another function


9. What is the purpose of the `this.state` object in React?

a. To store the state of the application

b. To manage the DOM elements

c. To handle user input

d. To improve the performance of the application

Answer: a. To store the state of the application

10. What is the purpose of the `this.props` object in React?

a. To store the state of the application

b. To manage the DOM elements

c. To handle user input

d. To pass data from a parent component to a child component

Answer: d. To pass data from a parent component to a child component

11. What is a functional component in React?


a. A component that is defined as a class

b. A component that is defined as a function

c. A component that is used for handling user input

d. A component that is used for managing the DOM elements

Answer: b. A component that is defined as a function

12. What is a class component in React?

a. A component that is defined as a function

b. A component that is defined as a class

c. A component that is used for handling user input

d. A component that is used for managing the DOM elements

Answer: b. A component that is defined as a class

13. What is the `this.props` object used for in React?


a. To store the state of the application

b. To manage the DOM elements

c. To handle user input

d. To pass data from a parent component to a child component

Answer: d. To pass data from a parent component to a child component

14. What is the `this.state` object used for in React?

a. To store the state of the application

b. To manage the DOM elements

c. To handle user input

d. To improve the performance of the application

Answer: a. To store the state of the application

15. What is the `this.setState` method used for in React?

a. To update the state of the application


b. To manage the DOM elements

c. To handle user input

d. To improve the performance of the application

Answer: a. To update the state of the application

16. What is the `this.props.children` property used for in React?

a. To store the state of the application

b. To manage the DOM elements

c. To handle user input

d. To pass data from a parent component to a child component

Answer: d.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy