Interview Q&A / System Design

INTERVIEW Q&A · 70 QUESTIONS

System Design interview questions

Caching, scaling, databases and classic design problems for beginners.

  1. What is a stale closure in a React effect, and how do you fix it?

    A closure captures the values from the render where it was created. An effect with a missing dependency keeps using old values. Fix it by listing the dependency, using the updater form of setState, or storing the latest value in a ref.

    IntermediateQuick answer1 min read