1. What is React?
React is a JavaScript library used for building user interfaces, especially single-page applications. It allows developers to create reusable UI components.
2. What are the features of React?
- Component-based architecture
- Virtual DOM
- Unidirectional data flow
- Reusable components
3. What is JSX?
JSX stands for JavaScript XML. It allows writing HTML inside JavaScript and makes code more readable.
4. What is a component in React?
Components are reusable pieces of UI. They can be functional or class-based.
5. What is Virtual DOM?
Virtual DOM is a lightweight copy of the real DOM. React updates only changed parts, improving performance.
6. What is state in React?
State is an object that stores data which can change over time and affects rendering.
7. What are props?
Props are inputs passed to components. They are read-only.
8. Difference between state and props?
State is managed within component and mutable. Props are passed from parent and immutable.
9. What is a functional component?
A JavaScript function that returns JSX.
10. What is a class component?
A component defined using ES6 class which extends React.Component.
11. What is useState?
A React Hook used to manage state in functional components.
12. What is useEffect?
Hook used to perform side effects like API calls.
13. What is key in React?
Keys help React identify elements in lists for efficient updates.
14. What is controlled component?
Form element controlled by React state.
15. What is uncontrolled component?
Form element managed by DOM itself.
16. What is React Router?
A library for routing in React applications.
17. What is conditional rendering?
Rendering components based on conditions
.
18. What are hooks?
Functions that allow using state and lifecycle features in functional components.
19. What is useRef?
Hook used to access DOM elements directly.
20. What is useContext?
Used to share data globally without passing props.
21. What is Redux?
State management library for large applications.
22. What is Context API?
Alternative to Redux for managing global state.
23. What is lazy loading?
Loading components only when needed.
24. What is Suspense?
Used with lazy loading to show fallback UI.
25. What is memo?
Used to prevent unnecessary re-renders.
26. What is useMemo?
Optimizes performance by memoizing values.
27. What is useCallback?
Memoizes functions to avoid re-creation.
28. What is reconciliation?
Process of updating DOM efficiently.
29. What are higher-order components?
Functions that take a component and return a new component.
30. What is prop drilling?
Passing props through multiple levels.
31. What is Fragment?
Used to group multiple elements without adding extra DOM nodes.
32. What is StrictMode?
Helps identify potential problems in application.
33. What is error boundary?
Catches JavaScript errors in components.
34. What is server-side rendering?
Rendering React components on server.
35. What is hydration?
Attaching event listeners to server-rendered HTML.
36. What is React Fiber?
New reconciliation engine for better performance.
37. What is batching?
Combining multiple state updates.
38. What is event handling in React?
Handling user actions like clicks using synthetic events.
39. What is synthetic event?
Cross-browser wrapper around native events.
40. What is default props?
Default values for props.
41. What is React Portal?
Used to render children outside parent DOM.
42. What is forwarding refs?
Passing ref to child components.
43. What is code splitting?
Splitting code into smaller bundles.
44. What is dynamic import?
Loading modules dynamically.
45. What is React DevTools?
Browser extension to debug React apps.
📢 Join Our WhatsApp Channel
💼 Get Daily IT Job Updates, Interview Preparation Tips & Instant Alerts directly on WhatsApp.
👉 Join WhatsApp Now📢 Join Our Telegram Channel
💼 Get Daily IT Job Updates, Interview Tips & Exclusive Alerts directly on Telegram!
👉 Join Telegram