ReactJS Top 50 Interview Questions
ReactJS Top 50 Interview Questions
js
Interview
Questions
And
Answers
1. What is React?
React is a front-end JavaScript library developed by Facebook for building user interfaces,
JSX, Components, Virtual DOM, One-way data binding, Lifecycle methods, Hooks.
3. What is JSX?
JSX stands for JavaScript XML. It allows you to write HTML structures in the same file as JavaScript
code.
Virtual DOM is a programming concept where a virtual representation of a UI is kept in memory and
Components are the building blocks of a React application's UI. They can be functional or
class-based.
Functional components are stateless and use hooks; class components are stateful and use
lifecycle methods.
Props are inputs to components. They are passed down from parent to child components.
State is a built-in object that stores property values that belong to the component.
9. What are React Hooks?
Hooks let you use state and other React features in functional components.
useEffect lets you perform side effects in function components (e.g., fetch data, update DOM).
componentWillUnmount.
Redux is a predictable state container for JavaScript apps, often used with React.
A reducer is a pure function that takes current state and an action, then returns a new state.
The Context API allows passing data through the component tree without manually passing props.
Reconciliation is the process through which React updates the DOM when state or props change.
Keys help React identify which items have changed, are added, or are removed.
Props are read-only and passed to the component; state is local and can change.
Lazy loading helps load components only when needed to improve performance.
A wrapper that lets you group multiple elements without adding extra nodes to the DOM.
React handles events using camelCase syntax and passes functions as event handlers.
Hydration is the process of attaching event listeners to static content rendered by the server.
Portals provide a way to render children into a DOM node outside the parent.
ReactDOM provides methods to interact with the DOM, like render and hydrate.