React.js
Hooks, rendering, data flow, and performance patterns used in React interviews.
React Rendering and Reconciliation
Know when React renders, why it re-renders, and how reconciliation updates the real DOM.
Beginner interview questions
Start with simple definitions, the main idea, and the basic mistakes interviewers expect you to avoid.
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.
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.
A teacher compares two answer sheets and only corrects the lines that changed instead of rewriting the whole page.
Interviewers often begin with a basic question to see whether you truly understand the concept instead of repeating memorized jargon.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Commit applies DOM updates.
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.
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.
A teacher compares two answer sheets and only corrects the lines that changed instead of rewriting the whole page.
This checks whether you can give a short, calm answer before the interviewer adds depth or follow-ups.
- Saying React updates the full DOM every time.
- Using unstable keys in dynamic lists.
Lifecycle methods describe when work happens as a component mounts, updates, and unmounts. In modern React, hooks often replace most class lifecycle usage.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
Keys help React track identity between renders so it can reuse the right item and preserve state correctly.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- When is index acceptable?
- How can wrong keys break form state?
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
Interviewers use this to check whether you understand related concepts well enough to compare them clearly.
- What role do keys play?
- Can a component render without a DOM change?
Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
Interviewers use this to check whether you understand related concepts well enough to compare them clearly.
- What role do keys play?
- Can a component render without a DOM change?
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
Interviewers use this to check whether you understand related concepts well enough to compare them clearly.
- What role do keys play?
- Can a component render without a DOM change?
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- What role do keys play?
- Can a component render without a DOM change?
Use it for side effects like fetches, subscriptions, timers, or syncing with external systems. Avoid it for values you can derive during render.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- How do you prevent race conditions?
- What should cleanup do?
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
Interviewers use this to check whether you understand related concepts well enough to compare them clearly.
- What role do keys play?
- Can a component render without a DOM change?
Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
Interviewers use this to check whether you understand related concepts well enough to compare them clearly.
- What role do keys play?
- Can a component render without a DOM change?
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
Lifecycle methods describe when work happens as a component mounts, updates, and unmounts. In modern React, hooks often replace most class lifecycle usage.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
1-3 Years interview questions
Cover common screening and theory questions that prove you know the fundamentals and can answer clearly.
Render calculates the next UI tree. Reconciliation compares old and new trees. Commit applies DOM updates. Stable keys preserve identity.
Render calculates the next UI tree. Reconciliation compares old and new trees. Commit applies DOM updates. Stable keys preserve identity.
A teacher compares two answer sheets and only corrects the lines that changed instead of rewriting the whole page.
This checks whether you can give a clean interview answer without getting lost in too much detail.
- Render is calculation, not always DOM work.
- Commit is when the DOM changes.
- Parent renders can trigger child renders.
Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test clarity, correctness, and how calmly you explain fundamentals.
- What role do keys play?
- Can a component render without a DOM change?
Keys help React track identity between renders so it can reuse the right item and preserve state correctly.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test clarity, correctness, and how calmly you explain fundamentals.
- When is index acceptable?
- How can wrong keys break form state?
3-6 Years interview questions
Focus on mid-level answers with practical examples, tradeoffs, and implementation thinking.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
Mid-level rounds expect more than definitions. They want structured explanation, correct terminology, and practical judgment.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Commit applies DOM updates.
- Stable keys preserve identity.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
Use it for side effects like fetches, subscriptions, timers, or syncing with external systems. Avoid it for values you can derive during render.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- How do you prevent race conditions?
- What should cleanup do?
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Render calculates the next UI tree.
- Reconciliation compares old and new trees.
- Saying React updates the full DOM every time.
Expert interview questions
Practice high-signal follow-ups around architecture, pitfalls, debugging, scale, and leadership-level judgment.
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.
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.
function ProductList({ products }: { products: { id: string; name: string }[] }) { return ( <ul>
Senior-leaning interviewers test whether you can move from definitions into tradeoffs, debugging, scale, and connected system thinking.
- 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?
Hooks, Especially useEffect
Explain hooks clearly and use useEffect only for real side effects.
Beginner interview questions
Start with simple definitions, the main idea, and the basic mistakes interviewers expect you to avoid.
useState stores local data. useEffect is for work outside render, like fetching, subscriptions, timers, or syncing to browser APIs.
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.
Render is writing homework. useEffect is stepping outside to submit it, listen for updates, or clean the board later.
Interviewers often begin with a basic question to see whether you truly understand the concept instead of repeating memorized jargon.
- useEffect is for side effects after render.
- Dependencies should match the values read inside.
- Cleanup runs before re-run or unmount.
useState for local data. useEffect for network, subscriptions, timers, DOM sync. Abort async work on change. Keep effect scope narrow.
useState for local data. useEffect for network, subscriptions, timers, DOM sync. Abort async work on change. Keep effect scope narrow.
Render is writing homework. useEffect is stepping outside to submit it, listen for updates, or clean the board later.
This checks whether you can give a short, calm answer before the interviewer adds depth or follow-ups.
- Using useEffect for derived values.
- Skipping dependencies to silence the linter.
Use it for side effects like fetches, subscriptions, timers, or syncing with external systems. Avoid it for values you can derive during render.
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.
function Profile({ userId }: { userId: string }) { const [user, setUser] = useState<{ name: string } | null>(null);
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- How do you prevent race conditions?
- What should cleanup do?
useState stores local data. useEffect is for work outside render, like fetching, subscriptions, timers, or syncing to browser APIs.
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.
function Profile({ userId }: { userId: string }) { const [user, setUser] = useState<{ name: string } | null>(null);
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- useEffect is for side effects after render.
- Dependencies should match the values read inside.
- Using useEffect for derived values.
1-3 Years interview questions
Cover common screening and theory questions that prove you know the fundamentals and can answer clearly.
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.
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.
Render is writing homework. useEffect is stepping outside to submit it, listen for updates, or clean the board later.
This checks whether you can give a clean interview answer without getting lost in too much detail.
- useState for local data.
- useEffect for network, subscriptions, timers, DOM sync.
- Abort async work on change.
Use it for side effects like fetches, subscriptions, timers, or syncing with external systems. Avoid it for values you can derive during render.
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.
function Profile({ userId }: { userId: string }) { const [user, setUser] = useState<{ name: string } | null>(null);
This is a common interview question used to test clarity, correctness, and how calmly you explain fundamentals.
- How do you prevent race conditions?
- What should cleanup do?
3-6 Years interview questions
Focus on mid-level answers with practical examples, tradeoffs, and implementation thinking.
useState stores local data. useEffect is for work outside render, like fetching, subscriptions, timers, or syncing to browser APIs.
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.
function Profile({ userId }: { userId: string }) { const [user, setUser] = useState<{ name: string } | null>(null);
Mid-level rounds expect more than definitions. They want structured explanation, correct terminology, and practical judgment.
- 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.
It happens when a callback or effect keeps an old value from a previous render and later uses outdated state or props.
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.
function Profile({ userId }: { userId: string }) { const [user, setUser] = useState<{ name: string } | null>(null);
This checks whether you can apply the concept in code and explain the reasoning, not only define it.
- How can functional state updates help?
- When would you use a ref?
useState stores local data. useEffect is for work outside render, like fetching, subscriptions, timers, or syncing to browser APIs.
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.
function Profile({ userId }: { userId: string }) { const [user, setUser] = useState<{ name: string } | null>(null);
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- useEffect is for side effects after render.
- Dependencies should match the values read inside.
- Using useEffect for derived values.
Expert interview questions
Practice high-signal follow-ups around architecture, pitfalls, debugging, scale, and leadership-level judgment.
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.
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.
function Profile({ userId }: { userId: string }) { const [user, setUser] = useState<{ name: string } | null>(null);
Senior-leaning interviewers test whether you can move from definitions into tradeoffs, debugging, scale, and connected system thinking.
- 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?
State Modeling and Data Flow
Choose between local state, lifted state, reducers, context, and server state cleanly.
Beginner interview questions
Start with simple definitions, the main idea, and the basic mistakes interviewers expect you to avoid.
Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.
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.
Keep a notebook on the desk that needs it. Move it to the class cupboard only if many students truly share it.
Interviewers often begin with a basic question to see whether you truly understand the concept instead of repeating memorized jargon.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- useReducer helps with workflow-heavy transitions.
State needs ownership. Avoid duplicate truth. Context distributes data but can widen render scope. Model around workflows, not only components.
State needs ownership. Avoid duplicate truth. Context distributes data but can widen render scope. Model around workflows, not only components.
Keep a notebook on the desk that needs it. Move it to the class cupboard only if many students truly share it.
This checks whether you can give a short, calm answer before the interviewer adds depth or follow-ups.
- Using global state for everything.
- Duplicating the same truth in many places.
Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
Interviewers use this to check whether you understand related concepts well enough to compare them clearly.
- What role do keys play?
- Can a component render without a DOM change?
Context lets you share data through a component tree without passing props manually through every level.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
Interviewers use this to check whether you understand related concepts well enough to compare them clearly.
- What role do keys play?
- Can a component render without a DOM change?
Refs give you direct access to a DOM node or component instance-like value. forwardRef lets a parent pass a ref through a component.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
A portal lets React render part of the UI in a different place in the DOM while keeping it in the same React tree.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
Interviewers use this to check whether you understand related concepts well enough to compare them clearly.
- What role do keys play?
- Can a component render without a DOM change?
Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
Interviewers use this to check whether you understand related concepts well enough to compare them clearly.
- What role do keys play?
- Can a component render without a DOM change?
Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Context lets you share data through a component tree without passing props manually through every level.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Context lets you share data through a component tree without passing props manually through every level.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
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.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- When is context a bad choice?
- How do you separate server state from UI state?
Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Rendering calculates the next UI tree. Reconciliation compares previous and next trees and decides minimal DOM updates.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
Interviewers use this to check whether you understand related concepts well enough to compare them clearly.
- What role do keys play?
- Can a component render without a DOM change?
Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
Interviewers use this to check whether you understand related concepts well enough to compare them clearly.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Props are values given from a parent component. State is local data that a component manages and can change over time.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
1-3 Years interview questions
Cover common screening and theory questions that prove you know the fundamentals and can answer clearly.
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.
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.
Keep a notebook on the desk that needs it. Move it to the class cupboard only if many students truly share it.
This checks whether you can give a clean interview answer without getting lost in too much detail.
- State needs ownership.
- Avoid duplicate truth.
- Context distributes data but can widen render scope.
Redux is a state-management pattern where state changes are handled in a predictable way through actions and reducers.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This checks whether you can turn the concept into code and explain the practical decisions while solving it.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
Redux is a state-management pattern where state changes are handled in a predictable way through actions and reducers.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Local first, shared only when needed.
- Lift state when siblings need one truth.
- Using global state for everything.
3-6 Years interview questions
Focus on mid-level answers with practical examples, tradeoffs, and implementation thinking.
Keep state as close as possible to where it is used, but high enough for every component that needs the same truth.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
Mid-level rounds expect more than definitions. They want structured explanation, correct terminology, and practical judgment.
- 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.
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.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
This checks your decision-making, tradeoffs, and ability to discuss the bigger picture.
- When is context a bad choice?
- How do you separate server state from UI state?
Expert interview questions
Practice high-signal follow-ups around architecture, pitfalls, debugging, scale, and leadership-level judgment.
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.
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.
type Action = | { type: 'start' } | { type: 'success'; payload: string[] }
Senior-leaning interviewers test whether you can move from definitions into tradeoffs, debugging, scale, and connected system thinking.
- 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 Performance Toolkit
Measure first, then reduce render surface, expensive work, and bundle cost.
Beginner interview questions
Start with simple definitions, the main idea, and the basic mistakes interviewers expect you to avoid.
Performance means doing less work, later work, or cheaper work. Find the slow part before fixing it.
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.
Do not buy a faster school bus if the real problem is that every student is carrying three extra bags.
Interviewers often begin with a basic question to see whether you truly understand the concept instead of repeating memorized jargon.
- Measure before optimizing.
- Reduce expensive render work and large list cost.
- Memoize only when it blocks real repeated work.
Profiler before fix. Window big lists. Split heavy code by route or feature. Do not over-memoize.
Profiler before fix. Window big lists. Split heavy code by route or feature. Do not over-memoize.
Do not buy a faster school bus if the real problem is that every student is carrying three extra bags.
This checks whether you can give a short, calm answer before the interviewer adds depth or follow-ups.
- Adding memoization without profiling.
- Ignoring bundle and network cost.
Performance means doing less work, later work, or cheaper work. Find the slow part before fixing it.
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.
const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Measure before optimizing.
- Reduce expensive render work and large list cost.
- Adding memoization without profiling.
Lazy loading and code splitting mean loading only the code needed now, instead of shipping everything on the first page load.
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.
const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Measure before optimizing.
- Reduce expensive render work and large list cost.
- Adding memoization without profiling.
Lazy loading and code splitting mean loading only the code needed now, instead of shipping everything on the first page load.
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.
const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });
This checks whether you can turn the concept into code and explain the practical decisions while solving it.
- Measure before optimizing.
- Reduce expensive render work and large list cost.
- Adding memoization without profiling.
Performance means doing less work, later work, or cheaper work. Find the slow part before fixing it.
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.
const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- Measure before optimizing.
- Reduce expensive render work and large list cost.
- Adding memoization without profiling.
1-3 Years interview questions
Cover common screening and theory questions that prove you know the fundamentals and can answer clearly.
Measure before optimizing. Reduce expensive render work and large list cost. Memoize only when it blocks real repeated work. Bundle strategy matters too.
Measure before optimizing. Reduce expensive render work and large list cost. Memoize only when it blocks real repeated work. Bundle strategy matters too.
Do not buy a faster school bus if the real problem is that every student is carrying three extra bags.
This checks whether you can give a clean interview answer without getting lost in too much detail.
- Profiler before fix.
- Window big lists.
- Split heavy code by route or feature.
3-6 Years interview questions
Focus on mid-level answers with practical examples, tradeoffs, and implementation thinking.
Performance means doing less work, later work, or cheaper work. Find the slow part before fixing it.
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.
const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });
Mid-level rounds expect more than definitions. They want structured explanation, correct terminology, and practical judgment.
- Measure before optimizing.
- Reduce expensive render work and large list cost.
- Memoize only when it blocks real repeated work.
- Bundle strategy matters too.
Measure first, identify the bottleneck, apply a targeted fix, and verify the UX improved.
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.
const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });
This checks your decision-making, tradeoffs, and ability to discuss the bigger picture.
- When would you use React.memo?
- How would you optimize a long list?
Performance means doing less work, later work, or cheaper work. Find the slow part before fixing it.
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.
const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });
This checks whether you can turn the concept into code and explain the practical decisions while solving it.
- Measure before optimizing.
- Reduce expensive render work and large list cost.
- Adding memoization without profiling.
Expert interview questions
Practice high-signal follow-ups around architecture, pitfalls, debugging, scale, and leadership-level judgment.
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.
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.
const Row = React.memo(function Row({ label }: { label: string }) { return <li>{label}</li>; });
Senior-leaning interviewers test whether you can move from definitions into tradeoffs, debugging, scale, and connected system thinking.
- 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 Core Questions from Source Library
Imported React interview questions that go beyond the hand-curated topic list.
Beginner interview questions
Start with simple definitions, the main idea, and the basic mistakes interviewers expect you to avoid.
This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.
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.
Think of this as the big React question notebook where all the extra classroom questions are collected in one place.
Interviewers often begin with a basic question to see whether you truly understand the concept instead of repeating memorized jargon.
- React builds UI from components.
- Props pass data in.
- State stores local changing data.
Components build the UI. Props flow down. State changes trigger renders. Use simple, correct mental models first.
Components build the UI. Props flow down. State changes trigger renders. Use simple, correct mental models first.
Think of this as the big React question notebook where all the extra classroom questions are collected in one place.
This checks whether you can give a short, calm answer before the interviewer adds depth or follow-ups.
- Memorizing definitions without understanding component data flow.
- Mixing old class-era terms with modern React without explaining the connection.
This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.
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.
function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- React builds UI from components.
- Props pass data in.
- Memorizing definitions without understanding component data flow.
This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.
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.
function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- React builds UI from components.
- Props pass data in.
- Memorizing definitions without understanding component data flow.
This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.
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.
function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- React builds UI from components.
- Props pass data in.
- Memorizing definitions without understanding component data flow.
This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.
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.
function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- React builds UI from components.
- Props pass data in.
- Memorizing definitions without understanding component data flow.
This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.
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.
function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- React builds UI from components.
- Props pass data in.
- Memorizing definitions without understanding component data flow.
1-3 Years interview questions
Cover common screening and theory questions that prove you know the fundamentals and can answer clearly.
React builds UI from components. Props pass data in. State stores local changing data. Rendering updates only what changed.
React builds UI from components. Props pass data in. State stores local changing data. Rendering updates only what changed.
Think of this as the big React question notebook where all the extra classroom questions are collected in one place.
This checks whether you can give a clean interview answer without getting lost in too much detail.
- Components build the UI.
- Props flow down.
- State changes trigger renders.
3-6 Years interview questions
Focus on mid-level answers with practical examples, tradeoffs, and implementation thinking.
This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.
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.
function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }
Mid-level rounds expect more than definitions. They want structured explanation, correct terminology, and practical judgment.
- React builds UI from components.
- Props pass data in.
- State stores local changing data.
- Rendering updates only what changed.
This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.
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.
function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- React builds UI from components.
- Props pass data in.
- Memorizing definitions without understanding component data flow.
This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.
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.
function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }
This is a common interview question used to test whether your fundamentals are clear, practical, and easy to explain.
- React builds UI from components.
- Props pass data in.
- Memorizing definitions without understanding component data flow.
This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.
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.
function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }
This checks whether you can turn the concept into code and explain the practical decisions while solving it.
- React builds UI from components.
- Props pass data in.
- Memorizing definitions without understanding component data flow.
This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.
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.
function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }
This checks whether you can turn the concept into code and explain the practical decisions while solving it.
- React builds UI from components.
- Props pass data in.
- Memorizing definitions without understanding component data flow.
This topic collects important React interview ideas like JSX, components, props, state, context, refs, portals, forms, and rendering basics.
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.
function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }
This checks whether you can turn the concept into code and explain the practical decisions while solving it.
- React builds UI from components.
- Props pass data in.
- Memorizing definitions without understanding component data flow.
Expert interview questions
Practice high-signal follow-ups around architecture, pitfalls, debugging, scale, and leadership-level judgment.
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.
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.
function Welcome({ name }: { name: string }) { return <h1>Hello {name}</h1>; }
Senior-leaning interviewers test whether you can move from definitions into tradeoffs, debugging, scale, and connected system thinking.
- 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?