React system design and trade-off drills
System-design interviews test whether you can choose boundaries under constraints and explain the consequencesβnot whether you can draw the most boxes.
Reusable design methodβ
1 Requirements
β 2 Constraints
β 3 Ownership
β 4 Data flow + rendering
β 5 Loading/failure
β 6 Performance/security/a11y
β 7 Testing/observability/trade-offs
Search experienceβ
For 100,000 products, clarify server/client search, latency, typo tolerance, URL/shareability, filters/sort, device constraints, and SEO/rendering requirements.
URL query/filter state shareable navigation truth
Search/data layer debounce/cancel/stale protection
server search/index + cache Result boundary Suspense/navigation/rendering
useDeferredValue may improve expensive result rendering; it does not reduce network requests.
Infinite live activity feedβ
How should live + historical feed data scale?
Historical pages/cursors β Server-state pagination/cache
High-frequency live events β Normalized external/live store with narrow subscriptions
Thousands of rendered items β Windowing/virtualization
Optimistic reactions β Temporary projection + canonical reconciliation
Bound in-memory retention and design event ordering/reconnect semantics explicitly.
Collaborative editorβ
Document model durable remote truth / CRDT/OT/backend model
Presence high-frequency external state
Local interaction selection Β· cursor Β· temporary UI
Optimistic edits pending projection
Version/conflict reconciliation policy
React UI selective rendering/subscription
Do not try to solve distributed consistency with React state alone.
Large admin tableβ
Use server pagination/filtering for scale, URL state for shareable filters, stable IDs, feature-owned selection, virtualization when measured, optimistic edits with server validation, and accessible table/grid semantics appropriate to the interaction model.
What is the table bottleneck?
Data volume/request cost β Server paging/filtering
DOM node volume/scrolling β Virtualization/windowing
One row update rerenders everything β Narrow ownership/subscriptions/component boundaries
Browser layout dominates β Fix DOM/CSS layout rather than React memoization
Multi-step onboardingβ
1 Route/step identity
β 2 Form draft
β 3 Server-persisted progress
β 4 Runtime validation
β 5 Accessible navigation/errors
β 6 Resume/idempotent save
Avoid mounting one giant form forever merely because the workflow is multi-step.
Notification systemβ
Server notifications + live/cross-tab channels durable records/events
Data/external store unread state + records
Notification center durable UI view
Design system for many teamsβ
Discuss semantic/accessibility contracts, primitives vs product components, tokens, refs, controlled/uncontrolled APIs, compound/headless patterns, versioning, contract tests, documentation, migration tooling, and ownership.
Should a shared primitive expose maximum polymorphism?
Product genuinely needs multiple semantic hosts β Maybe, with tested type/a11y constraints
Flexibility mainly creates invalid combinations β Prefer explicit semantic variants
Need is product-specific β Keep it in the feature wrapper
Analytics dashboardβ
Server-rendered shell initial context + read-only summary
Filters client interaction
Summary metrics server/streamed
Charts lazy client islands + accessible data alternative
Discuss chart bundle cost, Suspense reveal, filter ownership, cache freshness, expensive rendering, and non-visual alternatives for chart information.
Chat applicationβ
Separate durable message history, ephemeral typing/presence, optimistic pending sends, connection state, and pagination history. High-frequency presence should not automatically broadcast through broad Context.
Feature-flagged migration to RSCβ
1 Measure current bottleneck
β 2 Pick low-risk route
β 3 Establish server infrastructure
β 4 Keep interactive client islands
β 5 Move beneficial server reads
β 6 Canary + compare telemetry
β 7 Expand only with evidence
Do not migrate because a technology is newer.
Common trade-off drillsβ
Context or external store?
Tree-scoped, manageable frequency, broad consumers β Context may fit
Independent/high-frequency state with selective consumers β External store may fit
Local state or URL?
Temporary UI intent with no navigation semantics β Local state
Shareable/bookmarkable/back-forward state β URL
Optimistic or confirmed mutation UX?
Low-risk reversible action β Optimistic may improve UX
High-impact/destructive/money/permission action β Prefer stronger confirmation semantics
What the interviewer is evaluatingβ
Ownership one source of truth per concern
Boundaries execution Β· async Β· failure Β· trust
Scale data Β· DOM Β· subscriptions Β· bundles
Correctness authorization Β· races Β· conflicts
Experience loading Β· accessibility Β· responsiveness
Operations tests Β· telemetry Β· rollout Β· reversibility
A strong system-design answer makes alternatives explicit and explains why the chosen boundary is appropriate for the stated constraints.