React question bank¶
Rendering¶
- What causes a component to render, and when does the DOM change?
- How do type, position, and key control state preservation?
- What assumptions does
StrictModetest? - Why must render remain pure under concurrent work?
State and effects¶
- How do state snapshots explain stale closures?
- When should state move up, down, into a reducer, or into the URL?
- Which calculations do not need effects?
- How do cleanup and cancellation differ?
Architecture¶
- Separate local, URL, client-domain, and server state for this app.
- When would you add a server-state library?
- Where should runtime validation occur?
- 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.