0% found this document useful (0 votes)
191 views

25 React Interview

25 preguntas sobre entrevistas de trabajo con react

Uploaded by

mmm0117
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)
191 views

25 React Interview

25 preguntas sobre entrevistas de trabajo con react

Uploaded by

mmm0117
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/ 12

TOP 25 REACT INTERVIEW

QUESTIONS AND ANSWERS

MosT ASKED INTERVIEWONA


"MasterInterview QnA,Secure yourfuture job."
1. What is React?

Answer: A JavaScript library for building user


interfaces.

2. What is JSX?

Answer: A syntax extension for JavaScript that allows


HTML-ike code.

3. What is a component in React?

Answer: A reusable piece ofcode that represents a UI


element.

voUTH
Icon of
Raushan Kumar
con @haushan_kunar
4.What is the difference between
state and props?

Answer: State changes within a component, while


props are immutable data.

5. How do you handle events in React?

Answer: Using event handlers like onClick or


onChange.

6. What is the virtual DOM?

Answer: A lightweight in-memory


representation of the
real DOM.
voUTH
Icon of
Raushan Kumar
con @haushan_kumar
7. How does React handle rendering?

Answer: Using a reconciliation algorithm to


determine DOM changes.

8. What is a higher-order component (HOc)?

Answer: A function that takes a component and


returns a new Component.

9.What is React Hooks?

Answer: A way touse state and other React features


in functional components.

voUTH
Icon of
Raushan Kumar
con @haushan_kunar
10. What is the difference between
React and Angular?

Answer: React is a library, while Angular is a full


fledged framework.

11. How doyou optimize React performance?

Answer: Using memoization,


shouldComponentUpdate, and code splitting.

12. What is React Context?

Answer: A way to share data between


components without passing
props.
voUTH
Icon of
Raushan Kumar
con @raushan_kumar
13. How doyou handle errors in React?

Answer: Using try-catch blocks, error boundaries, and


component DidCatch.

14. What is a React fragment?

Answer: A way to group elements without adding an


extra DOM node.

15. How do you use React with TypeScript?

Answer: Using @types/react and @types/react-dom


packages.

voUTH
Icon of
Raushan Kumar
con @haushan_kunar
16. What is a controlled component?

Answer: A component that stores its state in the


parent component.

17.What is a uncontrolled component?

Answer:A component that stores itsstate internally.

18. What is the difference between createElement and


cloneElement?

Answer: createElement creates a new element,while


cloneElement clones an existing element.

voUTH
Icon of
Raushan Kumar
con @haushan_kunar
19. How do you implement server-side
rendering in React?

Answer: Using Next.js or a similar framework.

20. What is a React portal?

Answer: A way torender a component outside the


parent component's DOM.

21. How do you use React Refs?

Answer: To access DOM elements or child


components.

voUTH
Icon of
Raushan Kumar
con @haushan_kunar
22.What is the difference between
useState and useReducer?

Answer: useState is for simple state updates, while

useReducer is for complex state logic.

23. How do you handle side effects in React?

Answer: Using useEffect or useLayoutEffect hooks.

24. What is React Lazy?

Answer: A way to lazy-load componentsor modules.

voUTH
Icon of
Raushan Kumar
con @haushan_kunar
25. How doyou use React Router?

Answer: To handle client-side routing and


navigation.

voUTH
Icon of
Raushan Kumar
con @haushan_kunar
Note:

These answers are brief and to the point, and


are meant to be starting points for further
discussion.

Raushan Kumar
(@hasha krumah

voUTH
Icon of
Raushan Kumar
con @haushan_kunar
Follow
Raushan Kumar
for helpful posts, or you
might miss out!

You're The

YOUTH
Icon of World
BE FEARLE
COURAC
& CON

Share or Repost

©Raushan Kumar. Allrights reserved.

You might also like