Interactive On-Device & Curated Interview Engine

Master Your Next Tech Interview

Enter your tech stack or target role to generate targeted technical deep-dives, system design architectures, and behavioral STAR outlines with complete verified answers and code walkthroughs.

Configure Skills & Role

Add the technologies you want to prepare for or import your resume stack.

React
TypeScript
Next.js
System Design
Quick Suggestions
Category:
Q1React Reconciliation & Virtual DOMSeniortechnical

How does React's Reconciliation and Fiber architecture work, and how do keys prevent unnecessary DOM re-renders?

Why Interviewers Ask This:

Evaluates core React internals, rendering performance bottlenecks, and fiber work-loop understanding.

Verified Model Answer:
React Reconciliation is the algorithm React uses to diff the tree of elements to determine which parts of the real DOM need to be updated. 1. **The Fiber Architecture:** Prior to React 16, reconciliation was synchronous (the Stack Reconciler), meaning large component trees could block the main thread and drop frames. Fiber introduced a linked-list data structure representing units of work. It splits rendering into two phases: - **Render Phase (Asynchronous / Interruptible):** Builds the work-in-progress fiber tree, computes effects, and can pause or yield to the browser for high-priority tasks (e.g. user input, animations). - **Commit Phase (Synchronous / Uninterruptible):** Flushes all DOM mutations to the browser in one shot. 2. **The Role of 'key':** When children change, React iterates over both lists of children simultaneously. Without keys, if an item is prepended to the start of a list, React mutates every single child. With stable keys, React maps existing fibers by key and reorders DOM nodes rather than destroying and recreating them. Never use array index as a key for dynamic lists where order or items can change.
Executable Reference (tsx):
tsx
// Optimal List Rendering with Stable Keys and Memoization
import React, { memo } from "react";

interface Item {
  id: string; // Stable UUID or DB Primary Key
  title: string;
}

// Prevent re-rendering unchanged children
const ListItem = memo(function ListItem({ item }: { item: Item }) {
  return <li className="py-2 px-3 hover:bg-zinc-100">{item.title}</li>;
});

export function UserList({ items }: { items: Item[] }) {
  return (
    <ul>
      {items.map((item) => (
        // Key MUST be unique and stable across re-renders
        <ListItem key={item.id} item={item} />
      ))}
    </ul>
  );
}
Explanation: Using item.id as the key allows React Fiber to identify exactly which node moved, changed, or unmounted, eliminating redundant tree reconciliations.
Essential Talking Points:
  • •Fiber is an incremental rendering engine that breaks work into units of work that can be paused, resumed, or aborted.
  • •React uses a heuristic O(n) diffing algorithm comparing element types and unique keys.
  • •Keys allow React to match fiber nodes between commits, preventing re-mounts and state loss in lists.
Q2React Hooks & ClosuresMid-Leveltechnical

What causes stale closures in React hooks like useEffect or useCallback, and how do you resolve them?

Q3TypeScript Advanced Generics & Utility TypesSeniortechnical

How do conditional types, distributive types, and the 'infer' keyword work in TypeScript? Give a practical example.

Q4Distributed Rate LimitingSeniorsystem-design

Design a distributed rate limiter that handles 100,000 requests per second across multiple data centers. How do you prevent race conditions?

Q5High-Prority Production Outage / Incident ManagementSeniorbehavioral

Describe a critical production outage or bug you encountered. How did you identify the root cause, mitigate impact, and prevent it from recurring?

Q6Technical Disagreement & Cross-Functional AlignmentSeniorbehavioral

Tell me about a time you strongly disagreed with a senior colleague or product lead on an architecture or roadmap decision. How did you navigate it?

Ready to showcase these skills on your resume?

Align your project metrics, pass ATS screenings, and download a recruiter-ready PDF.

Open Resume Builder