0% found this document useful (0 votes)
4 views2 pages

Solving Question

The document provides a series of questions and answers related to React, covering topics such as components, state management, and the use of hooks. Key points include the advantages of React, the purpose of useState and useEffect, and how data is passed between components. It also highlights the importance of the Virtual DOM for fast rendering and the use of useRef for accessing DOM elements.

Uploaded by

wosocaw658
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)
4 views2 pages

Solving Question

The document provides a series of questions and answers related to React, covering topics such as components, state management, and the use of hooks. Key points include the advantages of React, the purpose of useState and useEffect, and how data is passed between components. It also highlights the importance of the Virtual DOM for fast rendering and the use of useRef for accessing DOM elements.

Uploaded by

wosocaw658
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/ 2

1. What is webpack ? Ans.

Both
2.

3.Dom is a tree like structure True or false? Ans. True

4. Ref is refer to component element return by ? Ans. (in functional components using useRef)
(in class components render())

5.State machine in React ? Ans. Example states: 'idle', 'loading', 'success', 'error'.

6. Everything is react? Ans. component.

7.

8.

9.

10.propse our? Ans. pass data from one component to another

11.whice Api is a must ? useState(),useEffect(),useContext(),useRef(),React Router

12.

13. React Component save ---? Ans. .js or .jsx


14.

15.React users? Ans. All above as like • Facebook , Instagram, Netflix,


Airbnb, WhatsApp

16.How to access the stoke of the component? Ans. Fuctional component useState()
and Class component this.State()

17. object can be passed from child to parent true or false ? Ans. False.

18.How to prevent the default behaviour to root component ? Ans. event.preventDefault();

19. In whice object React stores state ? Ans. useState()

20. what data are pass to component from outside ? Ans. Props

21. what are the two arrays react handle data ? Ans. useState(), Props

22.what is the main purpose react js ? Ans. dynamic user interfaces.

23. 2 Advantage of react ?

Ans. 1. Reusable Components – Build UI using small, reusable blocks of code.

2. Fast Rendering – Uses Virtual DOM for quick and efficient updates.
24. 2 Advantage of React Hook ?

Ans. 1. Simpler Code – Write cleaner and shorter components without using classes.

2. State & Side Effects in Functions – Manage state and lifecycle directly in functional
components using useState, useEffect, etc.

25. In whice Situation is would like to use useref()?

Ans. Use useRef() to access DOM elements or store values without re-rendering the
component.

You might also like