02 / 13

Discuss stack reconciler.

  1. 1

    The previous reconciliation algorithm, known as Stack Reconciler, worked in a recursive manner, blocking the main thread during the update process.

  2. 2

    This sometimes led to performance issues, especially when dealing with complex applications with frequent updates.

  3. 3

    Fibre aims to solve these problems by introducing a more efficient reconciliation process.

Difficulty: 6/10
Topics: reconciliation, fiber, rendering pipeline

Scenario Questions

0-2 years experience
  1. 1

    If you add a new component to a React app that uses the default stack reconciler, what steps does React take to render it to the DOM?

  2. 2

    When you call setState in a class component rendered with the stack reconciler, which part of the UI updates first and why?

2-5 years experience
  1. 1

    You notice a component's UI isn’t updating after a prop change. How would you investigate whether the stack reconciler is incorrectly bailing out, and what could cause that behavior?

  2. 2

    During a migration to React 18 concurrent features, the team keeps the stack reconciler for some parts of the app. What trade‑offs should they consider, and how might the reconciler affect performance?

5-8 years experience
  1. 1

    Explain how the stack reconciler’s depth‑first traversal impacts memory usage in a large component tree, and propose a strategy to mitigate any issues.

  2. 2

    If you need to build a custom renderer that must support both the stack and fiber reconciler, what design decisions would you make to keep the reconciler logic reusable and performant?

8+ years experience
  1. 1

    Your organization plans to replace the legacy stack reconciler with the fiber reconciler across multiple products. What architectural changes, testing strategies, and migration steps would you recommend to minimize risk?

  2. 2

    When designing a cross‑team UI library used in both web and native environments, how does the choice of reconciler (stack vs fiber) influence the library’s API surface and long‑term maintenance?

Follow-up Questions

  • Can you describe how React decides whether to reuse an existing DOM node during reconciliation?
  • What would change if you switched the app to use the fiber reconciler instead of the stack reconciler?
  • How does the reconciler interact with React's scheduling priorities?