Interview bank track

React.js

Hooks, rendering, data flow, and performance patterns used in React interviews.

5 topics119 interview questions with answers
React.js3-6y

React Rendering and Reconciliation

Know when React renders, why it re-renders, and how reconciliation updates the real DOM.

Open study topic
renderingreconciliationkeysvirtual-dom
Beginner

Beginner interview questions

33 questions

Start with simple definitions, the main idea, and the basic mistakes interviewers expect you to avoid.

screening
Beginner
Explain React Rendering and Reconciliation in very simple words.
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed. Easy picture: A teacher compares two answer sheets and only corrects the lines that changed instead of rewriting the whole page.

Example

A teacher compares two answer sheets and only corrects the lines that changed instead of rewriting the whole page.

Why interviewers ask this

Interviewers often begin with a basic question to see whether you truly understand the concept instead of repeating memorized jargon.

renderingreconciliationkeysvirtual-dom
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Commit applies DOM updates.
screening
Beginner
What are the first basics to remember about React Rendering and Reconciliation?
Easy answer

Render is calculation, not always DOM work. Commit is when the DOM changes. Parent renders can trigger child renders. Keys matter for lists with change.

Interview-ready answer

Render is calculation, not always DOM work. Commit is when the DOM changes. Parent renders can trigger child renders. Keys matter for lists with change.

Example

A teacher compares two answer sheets and only corrects the lines that changed instead of rewriting the whole page.

Why interviewers ask this

This checks whether you can give a short, calm answer before the interviewer adds depth or follow-ups.

renderingreconciliationkeysvirtual-dom
Common follow-ups
  • Saying React updates the full DOM every time.
  • Using unstable keys in dynamic lists.
theory
BeginnerReact interview questions- Ebook.docx
What are the different lifecycle methods in React?
Easy answer

Lifecycle methods describe when work happens as a component mounts, updates, and unmounts. In modern React, hooks often replace most class lifecycle usage.

Interview-ready answer

Class components use lifecycle methods such as componentDidMount, componentDidUpdate, and componentWillUnmount to run logic around mounting, updating, and cleanup. In modern React, hooks like useEffect usually handle the same concerns in function components.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactdocument
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReact interview questions- Ebook.docx
What is the distinction between virtual DOM and real DOM, and how does the virtual DOM function?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactdocument
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReact interview questions- Ebook.docx
Why is it important to use keys in lists?
Easy answer

Keys help React track identity between renders so it can reuse the right item and preserve state correctly.

Interview-ready answer

Stable keys tell React which list item is the same logical item across renders. Good keys preserve child state and prevent broken reuse. Dynamic lists should avoid array index unless the order never changes.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactdocument
Common follow-ups
  • When is index acceptable?
  • How can wrong keys break form state?
theory
BeginnerReact interview questions- Ebook.docx
What are the different types of components in React?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactdocument
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReact interview questions- Ebook.docx
What is JSX in React?
Easy answer

JSX is a React syntax that lets you write UI that looks a bit like HTML inside JavaScript. React turns that syntax into element objects.

Interview-ready answer

JSX is syntax sugar that lets React developers express UI declaratively inside JavaScript. It is transpiled into React element creation calls, which means browsers do not understand JSX directly but the build tool converts it before runtime.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactdocument
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is ReactJS?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What are the benefits of ReactJS?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is Create React App?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What are the features of ReactJS?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What are the disadvantages of ReactJS?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the difference between ReactJS and AngularJS?
Easy answer

Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.

Interview-ready answer

A render is React calling component functions to produce the next element tree. Reconciliation is the diffing step where React compares previous and next output, preserves stable identity, and updates the real DOM only where needed during commit.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

Interviewers use this to check whether you understand related concepts well enough to compare them clearly.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • What role do keys play?
  • Can a component render without a DOM change?
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the difference between ReactJS and React Native?
Easy answer

Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.

Interview-ready answer

A render is React calling component functions to produce the next element tree. Reconciliation is the diffing step where React compares previous and next output, preserves stable identity, and updates the real DOM only where needed during commit.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

Interviewers use this to check whether you understand related concepts well enough to compare them clearly.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • What role do keys play?
  • Can a component render without a DOM change?
theory
BeginnerReactJS-Questions-and-answers.pdf
What is JSX in React?
Easy answer

JSX is a React syntax that lets you write UI that looks a bit like HTML inside JavaScript. React turns that syntax into element objects.

Interview-ready answer

JSX is syntax sugar that lets React developers express UI declaratively inside JavaScript. It is transpiled into React element creation calls, which means browsers do not understand JSX directly but the build tool converts it before runtime.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What are the benefits of using JSX in React?
Easy answer

JSX is a React syntax that lets you write UI that looks a bit like HTML inside JavaScript. React turns that syntax into element objects.

Interview-ready answer

JSX is syntax sugar that lets React developers express UI declaratively inside JavaScript. It is transpiled into React element creation calls, which means browsers do not understand JSX directly but the build tool converts it before runtime.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the difference between DOM and Virtual DOM in?
Easy answer

Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.

Interview-ready answer

A render is React calling component functions to produce the next element tree. Reconciliation is the diffing step where React compares previous and next output, preserves stable identity, and updates the real DOM only where needed during commit.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

Interviewers use this to check whether you understand related concepts well enough to compare them clearly.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • What role do keys play?
  • Can a component render without a DOM change?
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the use of keys in ReactJS?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is Relay in ReactJS?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the arrow function in React?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What are React Mixins?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is React Fiber?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is React reconciliation?
Easy answer

Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.

Interview-ready answer

A render is React calling component functions to produce the next element tree. Reconciliation is the diffing step where React compares previous and next output, preserves stable identity, and updates the real DOM only where needed during commit.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • What role do keys play?
  • Can a component render without a DOM change?
theory
BeginnerReactJS-Questions-and-answers.pdf
Why use JSX in React?
Easy answer

Use it for side effects like fetches, subscriptions, timers, or syncing with external systems. Avoid it for values you can derive during render.

Interview-ready answer

useEffect runs after render and is appropriate for work outside the render phase. If a value can be derived directly from props and state, keeping it in render is simpler and avoids extra state, extra effects, and stale behavior.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • How do you prevent race conditions?
  • What should cleanup do?
theory
BeginnerReactJS-Questions-and-answers.pdf
Why a web directory can’t read JSX?
Easy answer

JSX is a React syntax that lets you write UI that looks a bit like HTML inside JavaScript. React turns that syntax into element objects.

Interview-ready answer

JSX is syntax sugar that lets React developers express UI declaratively inside JavaScript. It is transpiled into React element creation calls, which means browsers do not understand JSX directly but the build tool converts it before runtime.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is DOM diffing?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the role of of render() in React?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the difference between elements and components in?
Easy answer

Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.

Interview-ready answer

A render is React calling component functions to produce the next element tree. Reconciliation is the diffing step where React compares previous and next output, preserves stable identity, and updates the real DOM only where needed during commit.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

Interviewers use this to check whether you understand related concepts well enough to compare them clearly.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • What role do keys play?
  • Can a component render without a DOM change?
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the difference between componentWillMount() and?
Easy answer

Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.

Interview-ready answer

A render is React calling component functions to produce the next element tree. Reconciliation is the diffing step where React compares previous and next output, preserves stable identity, and updates the real DOM only where needed during commit.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

Interviewers use this to check whether you understand related concepts well enough to compare them clearly.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • What role do keys play?
  • Can a component render without a DOM change?
theory
BeginnerReactJS-Questions-and-answers.pdf
How to bind approaches or event handlers in JSX?
Easy answer

JSX is a React syntax that lets you write UI that looks a bit like HTML inside JavaScript. React turns that syntax into element objects.

Interview-ready answer

JSX is syntax sugar that lets React developers express UI declaratively inside JavaScript. It is transpiled into React element creation calls, which means browsers do not understand JSX directly but the build tool converts it before runtime.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is render prop in React?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the lifecycle method of React Component?
Easy answer

Lifecycle methods describe when work happens as a component mounts, updates, and unmounts. In modern React, hooks often replace most class lifecycle usage.

Interview-ready answer

Class components use lifecycle methods such as componentDidMount, componentDidUpdate, and componentWillUnmount to run logic around mounting, updating, and cleanup. In modern React, hooks like useEffect usually handle the same concerns in function components.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is PropTypes library in React?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
1-3 Years

1-3 Years interview questions

3 questions

Cover common screening and theory questions that prove you know the fundamentals and can answer clearly.

theory
1-3 Years
What points should a 1-3 year frontend developer cover for React Rendering and Reconciliation?
Easy answer

Render calculates the next UI tree. Reconciliation compares old and new trees. Commit applies DOM updates. Stable keys preserve identity.

Interview-ready answer

Render calculates the next UI tree. Reconciliation compares old and new trees. Commit applies DOM updates. Stable keys preserve identity.

Example

A teacher compares two answer sheets and only corrects the lines that changed instead of rewriting the whole page.

Why interviewers ask this

This checks whether you can give a clean interview answer without getting lost in too much detail.

renderingreconciliationkeysvirtual-dom
Common follow-ups
  • Render is calculation, not always DOM work.
  • Commit is when the DOM changes.
  • Parent renders can trigger child renders.
theory
1-3 Years
What is the difference between rendering and reconciliation in React?
Easy answer

Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.

Interview-ready answer

A render is React calling component functions to produce the next element tree. Reconciliation is the diffing step where React compares previous and next output, preserves stable identity, and updates the real DOM only where needed during commit.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test clarity, correctness, and how calmly you explain fundamentals.

reactrenderingreconciliation
Common follow-ups
  • What role do keys play?
  • Can a component render without a DOM change?
screening
1-3 Years
Why are keys important in React lists?
Easy answer

Keys help React track identity between renders so it can reuse the right item and preserve state correctly.

Interview-ready answer

Stable keys tell React which list item is the same logical item across renders. Good keys preserve child state and prevent broken reuse. Dynamic lists should avoid array index unless the order never changes.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test clarity, correctness, and how calmly you explain fundamentals.

keyslistsreact
Common follow-ups
  • When is index acceptable?
  • How can wrong keys break form state?
3-6 Years

3-6 Years interview questions

13 questions

Focus on mid-level answers with practical examples, tradeoffs, and implementation thinking.

theory
3-6 Years
How would you answer React Rendering and Reconciliation in a mid-level frontend interview?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

Mid-level rounds expect more than definitions. They want structured explanation, correct terminology, and practical judgment.

renderingreconciliationkeysvirtual-dom
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Commit applies DOM updates.
  • Stable keys preserve identity.
theory
3-6 YearsReactJS-Questions-and-answers.pdf
When we compose a React element, we do not correspond precisely to the DOM.?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
3-6 YearsReactJS-Questions-and-answers.pdf
How to install ReactJS?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
3-6 YearsReactJS-Questions-and-answers.pdf
Which browsers does ReactJS support?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
3-6 YearsReactJS-Questions-and-answers.pdf
How to create components in React?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
3-6 YearsReactJS-Questions-and-answers.pdf
When they are not similar, they will update the DOM. This process is known as?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
3-6 YearsReactJS-Questions-and-answers.pdf
When the elements are rendered twice, Virtual DOM starts checking the changes?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
3-6 YearsReactJS-Questions-and-answers.pdf
When to use the class component over a function?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
3-6 YearsReactJS-Questions-and-answers.pdf
When developing a React application, a deeply nested element often needs to use?
Easy answer

Use it for side effects like fetches, subscriptions, timers, or syncing with external systems. Avoid it for values you can derive during render.

Interview-ready answer

useEffect runs after render and is appropriate for work outside the render phase. If a value can be derived directly from props and state, keeping it in render is simpler and avoids extra state, extra effects, and stale behavior.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • How do you prevent race conditions?
  • What should cleanup do?
theory
3-6 YearsReactJS-Questions-and-answers.pdf
componentDidMount()?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
3-6 YearsReactJS-Questions-and-answers.pdf
How are Error Boundaries handled in React V15?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
3-6 YearsReactJS-Questions-and-answers.pdf
When a React component is created, several functions are called:?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
theory
3-6 YearsReactJS-Questions-and-answers.pdf
when the component is instantiated.?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

renderingreconciliationkeysvirtual-domreactebook
Common follow-ups
  • Render calculates the next UI tree.
  • Reconciliation compares old and new trees.
  • Saying React updates the full DOM every time.
Expert

Expert interview questions

1 questions

Practice high-signal follow-ups around architecture, pitfalls, debugging, scale, and leadership-level judgment.

design
Expert
What tradeoffs, pitfalls, and production issues do you discuss for React Rendering and Reconciliation in an expert-style round?
Easy answer

React keeps a light picture of the UI in memory. When props or state change, React compares the new picture with the old one and updates only the parts that changed. The main thing to avoid is: Saying React updates the full DOM every time.

Interview-ready answer

Render means React runs component functions to produce the next UI tree. Reconciliation is the diffing step where React compares previous and next trees, keeps elements with stable identity, and applies minimal DOM changes during commit. Parent renders, state updates, context changes, and store subscriptions are the usual triggers. Keys help preserve identity inside lists. Common pitfalls: Saying React updates the full DOM every time. Using unstable keys in dynamic lists. Treating every render like a bug. Related areas to connect in follow-ups: Hooks, Especially useEffect, React Performance Toolkit.

Example

function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>

Why interviewers ask this

Senior-leaning interviewers test whether you can move from definitions into tradeoffs, debugging, scale, and connected system thinking.

renderingreconciliationkeysvirtual-dom
Common follow-ups
  • What real bug or production issue can this topic cause?
  • What tradeoff would make you choose one approach over another?
  • How would you explain this decision in a code review or design discussion?
React.js3-6y

Hooks, Especially useEffect

Explain hooks clearly and use useEffect only for real side effects.

Open study topic
hooksuseEffectcleanupstale-closures
Beginner

Beginner interview questions

4 questions

Start with simple definitions, the main idea, and the basic mistakes interviewers expect you to avoid.

screening
Beginner
Explain Hooks, Especially useEffect in very simple words.
Easy answer

useState stores local data. useEffect is for work outside render, like fetching, subscriptions, timers, or syncing to browser APIs.

Interview-ready answer

useState stores local data. useEffect is for work outside render, like fetching, subscriptions, timers, or syncing to browser APIs. Easy picture: Render is writing homework. useEffect is stepping outside to submit it, listen for updates, or clean the board later.

Example

Render is writing homework. useEffect is stepping outside to submit it, listen for updates, or clean the board later.

Why interviewers ask this

Interviewers often begin with a basic question to see whether you truly understand the concept instead of repeating memorized jargon.

hooksuseEffectcleanupstale-closures
Common follow-ups
  • useEffect is for side effects after render.
  • Dependencies should match the values read inside.
  • Cleanup runs before re-run or unmount.
screening
Beginner
What are the first basics to remember about Hooks, Especially useEffect?
Easy answer

useState for local data. useEffect for network, subscriptions, timers, DOM sync. Abort async work on change. Keep effect scope narrow.

Interview-ready answer

useState for local data. useEffect for network, subscriptions, timers, DOM sync. Abort async work on change. Keep effect scope narrow.

Example

Render is writing homework. useEffect is stepping outside to submit it, listen for updates, or clean the board later.

Why interviewers ask this

This checks whether you can give a short, calm answer before the interviewer adds depth or follow-ups.

hooksuseEffectcleanupstale-closures
Common follow-ups
  • Using useEffect for derived values.
  • Skipping dependencies to silence the linter.
theory
BeginnerReact interview questions- Ebook.docx
What are React hooks, specifically useState and useEffect?
Easy answer

Use it for side effects like fetches, subscriptions, timers, or syncing with external systems. Avoid it for values you can derive during render.

Interview-ready answer

useEffect runs after render and is appropriate for work outside the render phase. If a value can be derived directly from props and state, keeping it in render is simpler and avoids extra state, extra effects, and stale behavior.

Example

function Profile({ userId }: { userId: string }) { const [user, setUser] = useState<{ name: string } | null>(null);

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

hooksuseEffectcleanupstale-closuresreactdocument
Common follow-ups
  • How do you prevent race conditions?
  • What should cleanup do?
theory
BeginnerReact interview questions- Ebook.docx
Explain of the asynchronous form of useState?
Easy answer

useState stores local data. useEffect is for work outside render, like fetching, subscriptions, timers, or syncing to browser APIs.

Interview-ready answer

Hooks let function components use stateful behavior. useEffect runs after render and should be reserved for side effects, not for values that can be derived during render. The dependency list describes which reactive values the effect reads, and cleanup removes subscriptions, timers, or stale async work.

Example

function Profile({ userId }: { userId: string }) { const [user, setUser] = useState<{ name: string } | null>(null);

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

hooksuseEffectcleanupstale-closuresreactdocument
Common follow-ups
  • useEffect is for side effects after render.
  • Dependencies should match the values read inside.
  • Using useEffect for derived values.
1-3 Years

1-3 Years interview questions

2 questions

Cover common screening and theory questions that prove you know the fundamentals and can answer clearly.

theory
1-3 Years
What points should a 1-3 year frontend developer cover for Hooks, Especially useEffect?
Easy answer

useEffect is for side effects after render. Dependencies should match the values read inside. Cleanup runs before re-run or unmount. Derived display values usually belong in render.

Interview-ready answer

useEffect is for side effects after render. Dependencies should match the values read inside. Cleanup runs before re-run or unmount. Derived display values usually belong in render.

Example

Render is writing homework. useEffect is stepping outside to submit it, listen for updates, or clean the board later.

Why interviewers ask this

This checks whether you can give a clean interview answer without getting lost in too much detail.

hooksuseEffectcleanupstale-closures
Common follow-ups
  • useState for local data.
  • useEffect for network, subscriptions, timers, DOM sync.
  • Abort async work on change.
theory
1-3 Years
When should you use useEffect and when should you avoid it?
Easy answer

Use it for side effects like fetches, subscriptions, timers, or syncing with external systems. Avoid it for values you can derive during render.

Interview-ready answer

useEffect runs after render and is appropriate for work outside the render phase. If a value can be derived directly from props and state, keeping it in render is simpler and avoids extra state, extra effects, and stale behavior.

Example

function Profile({ userId }: { userId: string }) { const [user, setUser] = useState<{ name: string } | null>(null);

Why interviewers ask this

This is a common interview question used to test clarity, correctness, and how calmly you explain fundamentals.

hooksuseEffectreact
Common follow-ups
  • How do you prevent race conditions?
  • What should cleanup do?
3-6 Years

3-6 Years interview questions

3 questions

Focus on mid-level answers with practical examples, tradeoffs, and implementation thinking.

theory
3-6 Years
How would you answer Hooks, Especially useEffect in a mid-level frontend interview?
Easy answer

useState stores local data. useEffect is for work outside render, like fetching, subscriptions, timers, or syncing to browser APIs.

Interview-ready answer

Hooks let function components use stateful behavior. useEffect runs after render and should be reserved for side effects, not for values that can be derived during render. The dependency list describes which reactive values the effect reads, and cleanup removes subscriptions, timers, or stale async work.

Example

function Profile({ userId }: { userId: string }) { const [user, setUser] = useState<{ name: string } | null>(null);

Why interviewers ask this

Mid-level rounds expect more than definitions. They want structured explanation, correct terminology, and practical judgment.

hooksuseEffectcleanupstale-closures
Common follow-ups
  • useEffect is for side effects after render.
  • Dependencies should match the values read inside.
  • Cleanup runs before re-run or unmount.
  • Derived display values usually belong in render.
coding
3-6 Years
What is a stale closure bug in React?
Easy answer

It happens when a callback or effect keeps an old value from a previous render and later uses outdated state or props.

Interview-ready answer

Function components create new closures on every render. If an effect, timer, or handler reads values that are not kept current through dependencies, refs, or safe updater functions, it can run later with outdated values. That is a stale closure bug.

Example

function Profile({ userId }: { userId: string }) { const [user, setUser] = useState<{ name: string } | null>(null);

Why interviewers ask this

This checks whether you can apply the concept in code and explain the reasoning, not only define it.

hooksclosuresbug-hunting
Common follow-ups
  • How can functional state updates help?
  • When would you use a ref?
theory
3-6 YearsJS and React Patterns and Solid principles.docx
Explain Solid principles?
Easy answer

useState stores local data. useEffect is for work outside render, like fetching, subscriptions, timers, or syncing to browser APIs.

Interview-ready answer

Hooks let function components use stateful behavior. useEffect runs after render and should be reserved for side effects, not for values that can be derived during render. The dependency list describes which reactive values the effect reads, and cleanup removes subscriptions, timers, or stale async work.

Example

function Profile({ userId }: { userId: string }) { const [user, setUser] = useState<{ name: string } | null>(null);

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

hooksuseEffectcleanupstale-closuresreactdocument
Common follow-ups
  • useEffect is for side effects after render.
  • Dependencies should match the values read inside.
  • Using useEffect for derived values.
Expert

Expert interview questions

1 questions

Practice high-signal follow-ups around architecture, pitfalls, debugging, scale, and leadership-level judgment.

design
Expert
What tradeoffs, pitfalls, and production issues do you discuss for Hooks, Especially useEffect in an expert-style round?
Easy answer

useState stores local data. useEffect is for work outside render, like fetching, subscriptions, timers, or syncing to browser APIs. The main thing to avoid is: Using useEffect for derived values.

Interview-ready answer

Hooks let function components use stateful behavior. useEffect runs after render and should be reserved for side effects, not for values that can be derived during render. The dependency list describes which reactive values the effect reads, and cleanup removes subscriptions, timers, or stale async work. Common pitfalls: Using useEffect for derived values. Skipping dependencies to silence the linter. Forgetting cleanup for timers or subscriptions. Related areas to connect in follow-ups: State Modeling and Data Flow, React Performance Toolkit.

Example

function Profile({ userId }: { userId: string }) { const [user, setUser] = useState<{ name: string } | null>(null);

Why interviewers ask this

Senior-leaning interviewers test whether you can move from definitions into tradeoffs, debugging, scale, and connected system thinking.

hooksuseEffectcleanupstale-closures
Common follow-ups
  • What real bug or production issue can this topic cause?
  • What tradeoff would make you choose one approach over another?
  • How would you explain this decision in a code review or design discussion?
React.js3-6y

State Modeling and Data Flow

Choose between local state, lifted state, reducers, context, and server state cleanly.

Open study topic
stateuseReducercontextarchitecture
Beginner

Beginner interview questions

27 questions

Start with simple definitions, the main idea, and the basic mistakes interviewers expect you to avoid.

screening
Beginner
Explain State Modeling and Data Flow in very simple words.
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.

Interview-ready answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth. Easy picture: Keep a notebook on the desk that needs it. Move it to the class cupboard only if many students truly share it.

Example

Keep a notebook on the desk that needs it. Move it to the class cupboard only if many students truly share it.

Why interviewers ask this

Interviewers often begin with a basic question to see whether you truly understand the concept instead of repeating memorized jargon.

stateuseReducercontextarchitecture
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • useReducer helps with workflow-heavy transitions.
screening
Beginner
What are the first basics to remember about State Modeling and Data Flow?
Easy answer

State needs ownership. Avoid duplicate truth. Context distributes data but can widen render scope. Model around workflows, not only components.

Interview-ready answer

State needs ownership. Avoid duplicate truth. Context distributes data but can widen render scope. Model around workflows, not only components.

Example

Keep a notebook on the desk that needs it. Move it to the class cupboard only if many students truly share it.

Why interviewers ask this

This checks whether you can give a short, calm answer before the interviewer adds depth or follow-ups.

stateuseReducercontextarchitecture
Common follow-ups
  • Using global state for everything.
  • Duplicating the same truth in many places.
theory
BeginnerReact interview questions- Ebook.docx
What are the differences between props and state in React?
Easy answer

Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.

Interview-ready answer

A render is React calling component functions to produce the next element tree. Reconciliation is the diffing step where React compares previous and next output, preserves stable identity, and updates the real DOM only where needed during commit.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

Interviewers use this to check whether you understand related concepts well enough to compare them clearly.

stateuseReducercontextarchitecturereactdocument
Common follow-ups
  • What role do keys play?
  • Can a component render without a DOM change?
theory
BeginnerReact interview questions- Ebook.docx
What is the Context API in React?
Easy answer

Context lets you share data through a component tree without passing props manually through every level.

Interview-ready answer

Context is a built-in React mechanism for sharing values through a subtree without prop drilling every intermediate component. It is useful for app-wide or section-wide concerns, but it should not replace thoughtful state ownership because broad context updates can widen rerender scope.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactdocument
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReact interview questions- Ebook.docx
What is the difference between controlled and uncontrolled inputs in React?
Easy answer

Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.

Interview-ready answer

A render is React calling component functions to produce the next element tree. Reconciliation is the diffing step where React compares previous and next output, preserves stable identity, and updates the real DOM only where needed during commit.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

Interviewers use this to check whether you understand related concepts well enough to compare them clearly.

stateuseReducercontextarchitecturereactdocument
Common follow-ups
  • What role do keys play?
  • Can a component render without a DOM change?
theory
BeginnerReact interview questions- Ebook.docx
What is the forwardRef method in React?
Easy answer

Refs give you direct access to a DOM node or component instance-like value. forwardRef lets a parent pass a ref through a component.

Interview-ready answer

Refs are useful when you need imperative access to a DOM element for focus, measurement, or integration with non-React code. forwardRef allows reusable components to expose that underlying ref safely to parent components.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactdocument
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReact interview questions- Ebook.docx
What are Higher-Order Components (HOCs)?
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.

Interview-ready answer

I separate UI state, form state, server state, and derived values first. Local state is the default when ownership is obvious. I lift state only when siblings need a shared source of truth. useReducer helps when multiple transitions affect the same workflow. Context is a transport mechanism, not a reason to move every value globally.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactdocument
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReact interview questions- Ebook.docx
What are Portals in React?
Easy answer

A portal lets React render part of the UI in a different place in the DOM while keeping it in the same React tree.

Interview-ready answer

Portals let React render UI into a DOM node outside the normal parent container while preserving React tree relationships such as context and event bubbling. They are commonly used for modals, tooltips, and overlays.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactdocument
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReact interview questions- Ebook.docx
What are stateless and stateful components?
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.

Interview-ready answer

I separate UI state, form state, server state, and derived values first. Local state is the default when ownership is obvious. I lift state only when siblings need a shared source of truth. useReducer helps when multiple transitions affect the same workflow. Context is a transport mechanism, not a reason to move every value globally.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactdocument
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the difference between createElement and?
Easy answer

Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.

Interview-ready answer

A render is React calling component functions to produce the next element tree. Reconciliation is the diffing step where React compares previous and next output, preserves stable identity, and updates the real DOM only where needed during commit.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

Interviewers use this to check whether you understand related concepts well enough to compare them clearly.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • What role do keys play?
  • Can a component render without a DOM change?
theory
BeginnerReactJS-Questions-and-answers.pdf
What is a React State?
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.

Interview-ready answer

I separate UI state, form state, server state, and derived values first. Local state is the default when ownership is obvious. I lift state only when siblings need a shared source of truth. useReducer helps when multiple transitions affect the same workflow. Context is a transport mechanism, not a reason to move every value globally.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReactJS-Questions-and-answers.pdf
What are React Props?
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.

Interview-ready answer

I separate UI state, form state, server state, and derived values first. Local state is the default when ownership is obvious. I lift state only when siblings need a shared source of truth. useReducer helps when multiple transitions affect the same workflow. Context is a transport mechanism, not a reason to move every value globally.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReactJS-Questions-and-answers.pdf
What are Default Props?
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.

Interview-ready answer

I separate UI state, form state, server state, and derived values first. Local state is the default when ownership is obvious. I lift state only when siblings need a shared source of truth. useReducer helps when multiple transitions affect the same workflow. Context is a transport mechanism, not a reason to move every value globally.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the difference between state and props in?
Easy answer

Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.

Interview-ready answer

A render is React calling component functions to produce the next element tree. Reconciliation is the diffing step where React compares previous and next output, preserves stable identity, and updates the real DOM only where needed during commit.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

Interviewers use this to check whether you understand related concepts well enough to compare them clearly.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • What role do keys play?
  • Can a component render without a DOM change?
theory
BeginnerReactJS-Questions-and-answers.pdf
What is setState() in ReactJS?
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.

Interview-ready answer

I separate UI state, form state, server state, and derived values first. Local state is the default when ownership is obvious. I lift state only when siblings need a shared source of truth. useReducer helps when multiple transitions affect the same workflow. Context is a transport mechanism, not a reason to move every value globally.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReactJS-Questions-and-answers.pdf
What are the Parameters of setState()?
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.

Interview-ready answer

I separate UI state, form state, server state, and derived values first. Local state is the default when ownership is obvious. I lift state only when siblings need a shared source of truth. useReducer helps when multiple transitions affect the same workflow. Context is a transport mechanism, not a reason to move every value globally.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the context in ReactJS?
Easy answer

Context lets you share data through a component tree without passing props manually through every level.

Interview-ready answer

Context is a built-in React mechanism for sharing values through a subtree without prop drilling every intermediate component. It is useful for app-wide or section-wide concerns, but it should not replace thoughtful state ownership because broad context updates can widen rerender scope.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the context.consumer in React?
Easy answer

Context lets you share data through a component tree without passing props manually through every level.

Interview-ready answer

Context is a built-in React mechanism for sharing values through a subtree without prop drilling every intermediate component. It is useful for app-wide or section-wide concerns, but it should not replace thoughtful state ownership because broad context updates can widen rerender scope.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReactJS-Questions-and-answers.pdf
When a component's props or state changes, React determines whether an actual?
Easy answer

Keep it local by default, lift it when multiple siblings need the same truth, and go wider only when many distant consumers truly need it.

Interview-ready answer

The choice depends on ownership and usage. Local state keeps components simpler. Lifting state helps sibling coordination. Context or a store helps when data is broadly shared, but it should not become a dumping ground. I also separate server cache from UI state because they solve different problems.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • When is context a bad choice?
  • How do you separate server state from UI state?
theory
BeginnerReactJS-Questions-and-answers.pdf
What are Stateless Functional Components?
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.

Interview-ready answer

I separate UI state, form state, server state, and derived values first. Local state is the default when ownership is obvious. I lift state only when siblings need a shared source of truth. useReducer helps when multiple transitions affect the same workflow. Context is a transport mechanism, not a reason to move every value globally.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReactJS-Questions-and-answers.pdf
What are Stateful Components in ReactJS?
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.

Interview-ready answer

I separate UI state, form state, server state, and derived values first. Local state is the default when ownership is obvious. I lift state only when siblings need a shared source of truth. useReducer helps when multiple transitions affect the same workflow. Context is a transport mechanism, not a reason to move every value globally.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the difference between Stateful and Stateless?
Easy answer

Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.

Interview-ready answer

A render is React calling component functions to produce the next element tree. Reconciliation is the diffing step where React compares previous and next output, preserves stable identity, and updates the real DOM only where needed during commit.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

Interviewers use this to check whether you understand related concepts well enough to compare them clearly.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • What role do keys play?
  • Can a component render without a DOM change?
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the differences between setState() and?
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.

Interview-ready answer

I separate UI state, form state, server state, and derived values first. Local state is the default when ownership is obvious. I lift state only when siblings need a shared source of truth. useReducer helps when multiple transitions affect the same workflow. Context is a transport mechanism, not a reason to move every value globally.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

Interviewers use this to check whether you understand related concepts well enough to compare them clearly.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReactJS-Questions-and-answers.pdf
replaceState() methods?
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.

Interview-ready answer

I separate UI state, form state, server state, and derived values first. Local state is the default when ownership is obvious. I lift state only when siblings need a shared source of truth. useReducer helps when multiple transitions affect the same workflow. Context is a transport mechanism, not a reason to move every value globally.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReactJS-Questions-and-answers.pdf
When we use setState(), the current and previous states are joined. replaceState()?
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.

Interview-ready answer

I separate UI state, form state, server state, and derived values first. Local state is the default when ownership is obvious. I lift state only when siblings need a shared source of truth. useReducer helps when multiple transitions affect the same workflow. Context is a transport mechanism, not a reason to move every value globally.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is the aim of getDerivedStateFromProps() lifecycle?
Easy answer

Props are values given from a parent component. State is local data that a component manages and can change over time.

Interview-ready answer

Props are read-only inputs passed from parent to child, while state is data owned and updated by a component. Props help with composition and reuse, while state models values that change over time and drive rerenders.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
BeginnerReactJS-Questions-and-answers.pdf
How can we renew the State of a component?
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.

Interview-ready answer

I separate UI state, form state, server state, and derived values first. Local state is the default when ownership is obvious. I lift state only when siblings need a shared source of truth. useReducer helps when multiple transitions affect the same workflow. Context is a transport mechanism, not a reason to move every value globally.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactebook
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
1-3 Years

1-3 Years interview questions

3 questions

Cover common screening and theory questions that prove you know the fundamentals and can answer clearly.

theory
1-3 Years
What points should a 1-3 year frontend developer cover for State Modeling and Data Flow?
Easy answer

Local first, shared only when needed. Lift state when siblings need one truth. useReducer helps with workflow-heavy transitions. Server cache and UI state are different.

Interview-ready answer

Local first, shared only when needed. Lift state when siblings need one truth. useReducer helps with workflow-heavy transitions. Server cache and UI state are different.

Example

Keep a notebook on the desk that needs it. Move it to the class cupboard only if many students truly share it.

Why interviewers ask this

This checks whether you can give a clean interview answer without getting lost in too much detail.

stateuseReducercontextarchitecture
Common follow-ups
  • State needs ownership.
  • Avoid duplicate truth.
  • Context distributes data but can widen render scope.
coding
1-3 YearsReact interview questions- Ebook.docx
How Redux Works: There are three fundamental building blocks in Redux:?
Easy answer

Redux is a state-management pattern where state changes are handled in a predictable way through actions and reducers.

Interview-ready answer

Redux centralizes state updates through actions, reducers, and a single predictable state tree. It helps when many parts of the UI depend on shared business state, but teams should still separate server data, local UI state, and derived values instead of pushing everything into one global store.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This checks whether you can turn the concept into code and explain the practical decisions while solving it.

stateuseReducercontextarchitecturereactdocument
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
theory
1-3 YearsReact interview questions- Ebook.docx
Explain react-redux?
Easy answer

Redux is a state-management pattern where state changes are handled in a predictable way through actions and reducers.

Interview-ready answer

Redux centralizes state updates through actions, reducers, and a single predictable state tree. It helps when many parts of the UI depend on shared business state, but teams should still separate server data, local UI state, and derived values instead of pushing everything into one global store.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

stateuseReducercontextarchitecturereactdocument
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • Using global state for everything.
3-6 Years

3-6 Years interview questions

2 questions

Focus on mid-level answers with practical examples, tradeoffs, and implementation thinking.

theory
3-6 Years
How would you answer State Modeling and Data Flow in a mid-level frontend interview?
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.

Interview-ready answer

I separate UI state, form state, server state, and derived values first. Local state is the default when ownership is obvious. I lift state only when siblings need a shared source of truth. useReducer helps when multiple transitions affect the same workflow. Context is a transport mechanism, not a reason to move every value globally.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

Mid-level rounds expect more than definitions. They want structured explanation, correct terminology, and practical judgment.

stateuseReducercontextarchitecture
Common follow-ups
  • Local first, shared only when needed.
  • Lift state when siblings need one truth.
  • useReducer helps with workflow-heavy transitions.
  • Server cache and UI state are different.
design
3-6 Years
How do you decide whether state should be local, lifted, or global?
Easy answer

Keep it local by default, lift it when multiple siblings need the same truth, and go wider only when many distant consumers truly need it.

Interview-ready answer

The choice depends on ownership and usage. Local state keeps components simpler. Lifting state helps sibling coordination. Context or a store helps when data is broadly shared, but it should not become a dumping ground. I also separate server cache from UI state because they solve different problems.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

This checks your decision-making, tradeoffs, and ability to discuss the bigger picture.

statearchitecturecontext
Common follow-ups
  • When is context a bad choice?
  • How do you separate server state from UI state?
Expert

Expert interview questions

1 questions

Practice high-signal follow-ups around architecture, pitfalls, debugging, scale, and leadership-level judgment.

design
Expert
What tradeoffs, pitfalls, and production issues do you discuss for State Modeling and Data Flow in an expert-style round?
Easy answer

Keep state as close as possible to where it is used, but high enough for every component that needs the same truth. The main thing to avoid is: Using global state for everything.

Interview-ready answer

I separate UI state, form state, server state, and derived values first. Local state is the default when ownership is obvious. I lift state only when siblings need a shared source of truth. useReducer helps when multiple transitions affect the same workflow. Context is a transport mechanism, not a reason to move every value globally. Common pitfalls: Using global state for everything. Duplicating the same truth in many places. Storing values that can be derived safely. Related areas to connect in follow-ups: Hooks, Especially useEffect, Frontend System Design: Search and Dashboard Thinking.

Example

type Action = | { type: 'start' } | { type: 'success'; payload: string[] }

Why interviewers ask this

Senior-leaning interviewers test whether you can move from definitions into tradeoffs, debugging, scale, and connected system thinking.

stateuseReducercontextarchitecture
Common follow-ups
  • What real bug or production issue can this topic cause?
  • What tradeoff would make you choose one approach over another?
  • How would you explain this decision in a code review or design discussion?
React.js3-6y

React Performance Toolkit

Measure first, then reduce render surface, expensive work, and bundle cost.

Open study topic
performancememoizationprofilingbundle
Beginner

Beginner interview questions

6 questions

Start with simple definitions, the main idea, and the basic mistakes interviewers expect you to avoid.

screening
Beginner
Explain React Performance Toolkit in very simple words.
Easy answer

Performance means doing less work, later work, or cheaper work. Find the slow part before fixing it.

Interview-ready answer

Performance means doing less work, later work, or cheaper work. Find the slow part before fixing it. Easy picture: Do not buy a faster school bus if the real problem is that every student is carrying three extra bags.

Example

Do not buy a faster school bus if the real problem is that every student is carrying three extra bags.

Why interviewers ask this

Interviewers often begin with a basic question to see whether you truly understand the concept instead of repeating memorized jargon.

performancememoizationprofilingbundle
Common follow-ups
  • Measure before optimizing.
  • Reduce expensive render work and large list cost.
  • Memoize only when it blocks real repeated work.
screening
Beginner
What are the first basics to remember about React Performance Toolkit?
Easy answer

Profiler before fix. Window big lists. Split heavy code by route or feature. Do not over-memoize.

Interview-ready answer

Profiler before fix. Window big lists. Split heavy code by route or feature. Do not over-memoize.

Example

Do not buy a faster school bus if the real problem is that every student is carrying three extra bags.

Why interviewers ask this

This checks whether you can give a short, calm answer before the interviewer adds depth or follow-ups.

performancememoizationprofilingbundle
Common follow-ups
  • Adding memoization without profiling.
  • Ignoring bundle and network cost.
theory
BeginnerReact interview questions- Ebook.docx
What are pure components, and how can we achieve them in functional components?
Easy answer

Performance means doing less work, later work, or cheaper work. Find the slow part before fixing it.

Interview-ready answer

The right process is profile first, identify whether the bottleneck is render cost, bundle size, network cost, or repeated state updates, then apply a targeted fix. Common tools are React DevTools profiler, list virtualization, route splitting, lazy loading, stable props for memoized children, and reducing context churn. I also mention when not to memoize because unnecessary memoization adds complexity.

Example

const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

performancememoizationprofilingbundlereactdocument
Common follow-ups
  • Measure before optimizing.
  • Reduce expensive render work and large list cost.
  • Adding memoization without profiling.
theory
BeginnerReact interview questions- Ebook.docx
What is lazy loading?
Easy answer

Lazy loading and code splitting mean loading only the code needed now, instead of shipping everything on the first page load.

Interview-ready answer

Lazy loading and code splitting reduce initial bundle cost by loading less JavaScript upfront. In React this is often done with dynamic imports and route or component boundaries so the user downloads heavy code only when it is needed.

Example

const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

performancememoizationprofilingbundlereactdocument
Common follow-ups
  • Measure before optimizing.
  • Reduce expensive render work and large list cost.
  • Adding memoization without profiling.
coding
BeginnerReact interview questions- Ebook.docx
What is code splitting?
Easy answer

Lazy loading and code splitting mean loading only the code needed now, instead of shipping everything on the first page load.

Interview-ready answer

Lazy loading and code splitting reduce initial bundle cost by loading less JavaScript upfront. In React this is often done with dynamic imports and route or component boundaries so the user downloads heavy code only when it is needed.

Example

const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });

Why interviewers ask this

This checks whether you can turn the concept into code and explain the practical decisions while solving it.

performancememoizationprofilingbundlereactdocument
Common follow-ups
  • Measure before optimizing.
  • Reduce expensive render work and large list cost.
  • Adding memoization without profiling.
theory
BeginnerReactJS-Questions-and-answers.pdf
What are Pure Components?
Easy answer

Performance means doing less work, later work, or cheaper work. Find the slow part before fixing it.

Interview-ready answer

The right process is profile first, identify whether the bottleneck is render cost, bundle size, network cost, or repeated state updates, then apply a targeted fix. Common tools are React DevTools profiler, list virtualization, route splitting, lazy loading, stable props for memoized children, and reducing context churn. I also mention when not to memoize because unnecessary memoization adds complexity.

Example

const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

performancememoizationprofilingbundlereactebook
Common follow-ups
  • Measure before optimizing.
  • Reduce expensive render work and large list cost.
  • Adding memoization without profiling.
1-3 Years

1-3 Years interview questions

1 questions

Cover common screening and theory questions that prove you know the fundamentals and can answer clearly.

theory
1-3 Years
What points should a 1-3 year frontend developer cover for React Performance Toolkit?
Easy answer

Measure before optimizing. Reduce expensive render work and large list cost. Memoize only when it blocks real repeated work. Bundle strategy matters too.

Interview-ready answer

Measure before optimizing. Reduce expensive render work and large list cost. Memoize only when it blocks real repeated work. Bundle strategy matters too.

Example

Do not buy a faster school bus if the real problem is that every student is carrying three extra bags.

Why interviewers ask this

This checks whether you can give a clean interview answer without getting lost in too much detail.

performancememoizationprofilingbundle
Common follow-ups
  • Profiler before fix.
  • Window big lists.
  • Split heavy code by route or feature.
3-6 Years

3-6 Years interview questions

3 questions

Focus on mid-level answers with practical examples, tradeoffs, and implementation thinking.

theory
3-6 Years
How would you answer React Performance Toolkit in a mid-level frontend interview?
Easy answer

Performance means doing less work, later work, or cheaper work. Find the slow part before fixing it.

Interview-ready answer

The right process is profile first, identify whether the bottleneck is render cost, bundle size, network cost, or repeated state updates, then apply a targeted fix. Common tools are React DevTools profiler, list virtualization, route splitting, lazy loading, stable props for memoized children, and reducing context churn. I also mention when not to memoize because unnecessary memoization adds complexity.

Example

const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });

Why interviewers ask this

Mid-level rounds expect more than definitions. They want structured explanation, correct terminology, and practical judgment.

performancememoizationprofilingbundle
Common follow-ups
  • Measure before optimizing.
  • Reduce expensive render work and large list cost.
  • Memoize only when it blocks real repeated work.
  • Bundle strategy matters too.
design
3-6 Years
What is your process for fixing a slow React screen?
Easy answer

Measure first, identify the bottleneck, apply a targeted fix, and verify the UX improved.

Interview-ready answer

I start with profiling and browser metrics to separate render cost, network cost, and bundle cost. Then I narrow the hot path: expensive computation, repeated child renders, large lists, unnecessary store updates, or oversized bundles. After the smallest useful fix, I re-measure.

Example

const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });

Why interviewers ask this

This checks your decision-making, tradeoffs, and ability to discuss the bigger picture.

performanceprofilingreact
Common follow-ups
  • When would you use React.memo?
  • How would you optimize a long list?
coding
3-6 YearsReact interview questions- Ebook.docx
Can you explain what web workers are and how they enable running scripts in background threads while communicating with the main JavaScript code?
Easy answer

Performance means doing less work, later work, or cheaper work. Find the slow part before fixing it.

Interview-ready answer

The right process is profile first, identify whether the bottleneck is render cost, bundle size, network cost, or repeated state updates, then apply a targeted fix. Common tools are React DevTools profiler, list virtualization, route splitting, lazy loading, stable props for memoized children, and reducing context churn. I also mention when not to memoize because unnecessary memoization adds complexity.

Example

const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });

Why interviewers ask this

This checks whether you can turn the concept into code and explain the practical decisions while solving it.

performancememoizationprofilingbundlereactdocument
Common follow-ups
  • Measure before optimizing.
  • Reduce expensive render work and large list cost.
  • Adding memoization without profiling.
Expert

Expert interview questions

1 questions

Practice high-signal follow-ups around architecture, pitfalls, debugging, scale, and leadership-level judgment.

design
Expert
What tradeoffs, pitfalls, and production issues do you discuss for React Performance Toolkit in an expert-style round?
Easy answer

Performance means doing less work, later work, or cheaper work. Find the slow part before fixing it. The main thing to avoid is: Adding memoization without profiling.

Interview-ready answer

The right process is profile first, identify whether the bottleneck is render cost, bundle size, network cost, or repeated state updates, then apply a targeted fix. Common tools are React DevTools profiler, list virtualization, route splitting, lazy loading, stable props for memoized children, and reducing context churn. I also mention when not to memoize because unnecessary memoization adds complexity. Common pitfalls: Adding memoization without profiling. Ignoring bundle and network cost. Assuming fewer renders always means better UX. Related areas to connect in follow-ups: React Rendering and Reconciliation, Web Performance and Browser Security Basics.

Example

const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });

Why interviewers ask this

Senior-leaning interviewers test whether you can move from definitions into tradeoffs, debugging, scale, and connected system thinking.

performancememoizationprofilingbundle
Common follow-ups
  • What real bug or production issue can this topic cause?
  • What tradeoff would make you choose one approach over another?
  • How would you explain this decision in a code review or design discussion?
React.js3-6y

React Core Questions from Source Library

Imported React interview questions that go beyond the hand-curated topic list.

Open study topic
reactjsxcomponentspropsstatecontextrefs
Beginner

Beginner interview questions

7 questions

Start with simple definitions, the main idea, and the basic mistakes interviewers expect you to avoid.

screening
Beginner
Explain React Core Questions from Source Library in very simple words.
Easy answer

This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.

Interview-ready answer

This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics. Easy picture: Think of this as the big React question notebook where all the extra classroom questions are collected in one place.

Example

Think of this as the big React question notebook where all the extra classroom questions are collected in one place.

Why interviewers ask this

Interviewers often begin with a basic question to see whether you truly understand the concept instead of repeating memorized jargon.

reactjsxcomponentspropsstatecontextrefs
Common follow-ups
  • React builds UI from components.
  • Props pass data in.
  • State stores local changing data.
screening
Beginner
What are the first basics to remember about React Core Questions from Source Library?
Easy answer

Components build the UI. Props flow down. State changes trigger renders. Use simple, correct mental models first.

Interview-ready answer

Components build the UI. Props flow down. State changes trigger renders. Use simple, correct mental models first.

Example

Think of this as the big React question notebook where all the extra classroom questions are collected in one place.

Why interviewers ask this

This checks whether you can give a short, calm answer before the interviewer adds depth or follow-ups.

reactjsxcomponentspropsstatecontextrefs
Common follow-ups
  • Memorizing definitions without understanding component data flow.
  • Mixing old class-era terms with modern React without explaining the connection.
theory
BeginnerReact interview questions- Ebook.docx
What is the purpose of ESLint, Babel plugin, and Webpack in JavaScript development?
Easy answer

This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.

Interview-ready answer

This section covers core React interview questions from your imported materials. The focus is understanding React mental models, component design, state flow, rendering behavior, and practical patterns used in real applications.

Example

function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

reactjsxcomponentspropsstatecontextrefsdocument
Common follow-ups
  • React builds UI from components.
  • Props pass data in.
  • Memorizing definitions without understanding component data flow.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is Prop Drilling?
Easy answer

This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.

Interview-ready answer

This section covers core React interview questions from your imported materials. The focus is understanding React mental models, component design, state flow, rendering behavior, and practical patterns used in real applications.

Example

function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

reactjsxcomponentspropsstatecontextrefsebook
Common follow-ups
  • React builds UI from components.
  • Props pass data in.
  • Memorizing definitions without understanding component data flow.
theory
BeginnerReactJS-Questions-and-answers.pdf
What is NextJS?
Easy answer

This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.

Interview-ready answer

This section covers core React interview questions from your imported materials. The focus is understanding React mental models, component design, state flow, rendering behavior, and practical patterns used in real applications.

Example

function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

reactjsxcomponentspropsstatecontextrefsebook
Common follow-ups
  • React builds UI from components.
  • Props pass data in.
  • Memorizing definitions without understanding component data flow.
theory
BeginnerReactJS-Questions-and-answers.pdf
What are the features of Next.js?
Easy answer

This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.

Interview-ready answer

This section covers core React interview questions from your imported materials. The focus is understanding React mental models, component design, state flow, rendering behavior, and practical patterns used in real applications.

Example

function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

reactjsxcomponentspropsstatecontextrefsebook
Common follow-ups
  • React builds UI from components.
  • Props pass data in.
  • Memorizing definitions without understanding component data flow.
theory
BeginnerReactJS-Questions-and-answers.pdf
What are Error Boundaries?
Easy answer

This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.

Interview-ready answer

This section covers core React interview questions from your imported materials. The focus is understanding React mental models, component design, state flow, rendering behavior, and practical patterns used in real applications.

Example

function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

reactjsxcomponentspropsstatecontextrefsebook
Common follow-ups
  • React builds UI from components.
  • Props pass data in.
  • Memorizing definitions without understanding component data flow.
1-3 Years

1-3 Years interview questions

1 questions

Cover common screening and theory questions that prove you know the fundamentals and can answer clearly.

theory
1-3 Years
What points should a 1-3 year frontend developer cover for React Core Questions from Source Library?
Easy answer

React builds UI from components. Props pass data in. State stores local changing data. Rendering updates only what changed.

Interview-ready answer

React builds UI from components. Props pass data in. State stores local changing data. Rendering updates only what changed.

Example

Think of this as the big React question notebook where all the extra classroom questions are collected in one place.

Why interviewers ask this

This checks whether you can give a clean interview answer without getting lost in too much detail.

reactjsxcomponentspropsstatecontextrefs
Common follow-ups
  • Components build the UI.
  • Props flow down.
  • State changes trigger renders.
3-6 Years

3-6 Years interview questions

6 questions

Focus on mid-level answers with practical examples, tradeoffs, and implementation thinking.

theory
3-6 Years
How would you answer React Core Questions from Source Library in a mid-level frontend interview?
Easy answer

This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.

Interview-ready answer

This section covers core React interview questions from your imported materials. The focus is understanding React mental models, component design, state flow, rendering behavior, and practical patterns used in real applications.

Example

function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }

Why interviewers ask this

Mid-level rounds expect more than definitions. They want structured explanation, correct terminology, and practical judgment.

reactjsxcomponentspropsstatecontextrefs
Common follow-ups
  • React builds UI from components.
  • Props pass data in.
  • State stores local changing data.
  • Rendering updates only what changed.
theory
3-6 YearsJS and React Patterns and Solid principles.docx
When a class cannot determine the subclass it must instantiate.?
Easy answer

This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.

Interview-ready answer

This section covers core React interview questions from your imported materials. The focus is understanding React mental models, component design, state flow, rendering behavior, and practical patterns used in real applications.

Example

function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

reactjsxcomponentspropsstatecontextrefsdocument
Common follow-ups
  • React builds UI from components.
  • Props pass data in.
  • Memorizing definitions without understanding component data flow.
theory
3-6 YearsReact interview questions- Ebook.docx
When an image comes into view, a JavaScript function is triggered to load that particular image dynamically.?
Easy answer

This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.

Interview-ready answer

This section covers core React interview questions from your imported materials. The focus is understanding React mental models, component design, state flow, rendering behavior, and practical patterns used in real applications.

Example

function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }

Why interviewers ask this

This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.

reactjsxcomponentspropsstatecontextrefsdocument
Common follow-ups
  • React builds UI from components.
  • Props pass data in.
  • Memorizing definitions without understanding component data flow.
coding
3-6 YearsReact interview questions- Ebook.docx
When the user navigates to the Home page, the specific code for that page is loaded and executed.?
Easy answer

This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.

Interview-ready answer

This section covers core React interview questions from your imported materials. The focus is understanding React mental models, component design, state flow, rendering behavior, and practical patterns used in real applications.

Example

function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }

Why interviewers ask this

This checks whether you can turn the concept into code and explain the practical decisions while solving it.

reactjsxcomponentspropsstatecontextrefsdocument
Common follow-ups
  • React builds UI from components.
  • Props pass data in.
  • Memorizing definitions without understanding component data flow.
coding
3-6 YearsReact interview questions- Ebook.docx
When the user navigates to the About page, the code for the About page is loaded and executed.?
Easy answer

This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.

Interview-ready answer

This section covers core React interview questions from your imported materials. The focus is understanding React mental models, component design, state flow, rendering behavior, and practical patterns used in real applications.

Example

function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }

Why interviewers ask this

This checks whether you can turn the concept into code and explain the practical decisions while solving it.

reactjsxcomponentspropsstatecontextrefsdocument
Common follow-ups
  • React builds UI from components.
  • Props pass data in.
  • Memorizing definitions without understanding component data flow.
coding
3-6 YearsReactJS-Questions-and-answers.pdf
When we are about to build a web application with high customer connection and view?
Easy answer

This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.

Interview-ready answer

This section covers core React interview questions from your imported materials. The focus is understanding React mental models, component design, state flow, rendering behavior, and practical patterns used in real applications.

Example

function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }

Why interviewers ask this

This checks whether you can turn the concept into code and explain the practical decisions while solving it.

reactjsxcomponentspropsstatecontextrefsebook
Common follow-ups
  • React builds UI from components.
  • Props pass data in.
  • Memorizing definitions without understanding component data flow.
Expert

Expert interview questions

1 questions

Practice high-signal follow-ups around architecture, pitfalls, debugging, scale, and leadership-level judgment.

design
Expert
What tradeoffs, pitfalls, and production issues do you discuss for React Core Questions from Source Library in an expert-style round?
Easy answer

This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics. The main thing to avoid is: Memorizing definitions without understanding component data flow.

Interview-ready answer

This section covers core React interview questions from your imported materials. The focus is understanding React mental models, component design, state flow, rendering behavior, and practical patterns used in real applications. Common pitfalls: Memorizing definitions without understanding component data flow. Mixing old class-era terms with modern React without explaining the connection. Related areas to connect in follow-ups: React Rendering and Reconciliation, Hooks, Especially useEffect, State Modeling and Data Flow.

Example

function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }

Why interviewers ask this

Senior-leaning interviewers test whether you can move from definitions into tradeoffs, debugging, scale, and connected system thinking.

reactjsxcomponentspropsstatecontextrefs
Common follow-ups
  • What real bug or production issue can this topic cause?
  • What tradeoff would make you choose one approach over another?
  • How would you explain this decision in a code review or design discussion?