INTERVIEW QUESTIONS

React Interview Questions

Practice React prompts by theme and build clearer interview answers.

Practice by topicRole and skill lensesClear answer prompts

Showing 52 practice prompts

✦

REACT

What problem do React hooks actually solve?

Hooks allow function components to manage stateful logic, lifecycle side effects, and custom abstractions without using ES6 class components or complex wrapper patterns like Higher-Order Components (HOCs) and Render Props. This colocates related logic in single functions rather than splitting it across lifecycle methods (componentDidMount, componentDidUpdate, componentWillUnmount).
CompanyMeta◦ Hooks
✦

REACT

What is the Virtual DOM and how does React use it?

The Virtual DOM is an in-memory representation of real DOM elements maintained by React. When state changes, React creates a new virtual DOM tree, diffs it against the previous tree using its reconciliation algorithm, computes the minimal set of changes (patches), and batches real DOM updates, minimizing expensive layout recalculations in the browser.
CompanyGoogle◦ Architecture
✦

REACT

Explain the difference between controlled and uncontrolled inputs in React.

Controlled inputs have their current value driven by React state via the 'value' prop and updated through an 'onChange' handler. Uncontrolled inputs store their value directly in the DOM tree, and React accesses their value on demand using a ref (e.g., inputRef.current.value), similar to traditional HTML form inputs.
CompanyAmazon◦ Forms
✦

REACT

What is the difference between props and state in React?

'props' (short for properties) are read-only inputs passed from a parent component to a child component, making components reusable and pure. 'state' is mutable data managed internally by the component itself over its lifecycle; when state changes, it triggers a re-render of the component and its children.
CompanyNetflix◦ Core Concepts
✦

REACT

What are the Rules of Hooks in React?

1) Only call hooks at the top level of function components or custom hooks—never call them inside loops, conditions, or nested functions to ensure hooks are called in the exact same order on every render. 2) Only call hooks from React function components or custom hooks, not from regular JavaScript functions.
CompanyMicrosoft◦ Hooks
…

Your next interview is closer than you think.

Practice smarter and land better opportunities.

✓ Start with the free plan✓ No credit card✓ Cancel anytime
Start preparing free