Skip to content

React question bank

Rendering

  1. What causes a component to render, and when does the DOM change?
  2. How do type, position, and key control state preservation?
  3. What assumptions does StrictMode test?
  4. Why must render remain pure under concurrent work?

State and effects

  1. How do state snapshots explain stale closures?
  2. When should state move up, down, into a reducer, or into the URL?
  3. Which calculations do not need effects?
  4. How do cleanup and cancellation differ?

Architecture

  1. Separate local, URL, client-domain, and server state for this app.
  2. When would you add a server-state library?
  3. Where should runtime validation occur?
  4. Compare SPA, SSR, static generation, and streaming for this product.

For every answer: explain the mechanism, give a failure example, state a tradeoff, and identify evidence that could change the decision.