Solving Question
Solving Question
Both
2.
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'.
7.
8.
9.
12.
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.
20. what data are pass to component from outside ? Ans. Props
21. what are the two arrays react handle data ? Ans. useState(), Props
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.
Ans. Use useRef() to access DOM elements or store values without re-rendering the
component.