90-Minute Frontend Deep Dive
This round simulates a senior frontend interview where React knowledge is necessary but not sufficient.
Interview planβ
0β15 min React + JavaScript fundamentals
15β30 min browser/platform reasoning
30β45 min accessibility + testing
45β60 min performance/debugging
60β85 min frontend system design
85β90 min candidate questions
Part 1 β React + JavaScriptβ
Prompt 1β
Explain why closures matter in React.
Strong answer:
- functions capture lexical environment;
- handlers and Effect callbacks observe values from the render that created them;
- stale closure bugs are often misunderstood as React βnot updatingβ;
- functional state updates, Effect dependencies, refs, or architecture changes solve different closure-related problems.
Prompt 2β
What is the difference between a value being mutable and React state being immutable by convention?
Expected:
- JavaScript objects are mutable;
- React state should be treated as a snapshot;
- replacing state enables predictable change detection and avoids mutating values used by previous renders;
- local mutation of newly created objects can be fine before publishing them.
Prompt 3β
What happens when you define a component inside another component?
Expected:
- a new component function identity can be created on each render;
- React may treat it as a different component type;
- state can reset;
- compiler/lint rules can flag static-component problems;
- define stable components outside when they are conceptually independent.
Part 2 β browser and platformβ
Prompt 4β
A click handler updates state and then reads layout. What could go wrong?
Discuss:
- state update scheduling;
- DOM may not yet reflect the new React state;
flushSyncexists for rare integration cases but should not become default control flow;useLayoutEffectcan measure after DOM mutation before paint when necessary;- layout reads/writes can cause performance problems.
Prompt 5β
Explain event propagation in a React app with portals.
Strong answer:
- portals change DOM placement, not React ownership;
- React event propagation follows the React tree;
- DOM native propagation and React logical ownership can therefore surprise developers;
- use clear event boundaries instead of relying on visual DOM placement assumptions.
Prompt 6β
When would you use an external store subscription instead of Context?
Expected:
- state exists outside React;
- selective subscription/high update frequency matters;
- tearing-consistent snapshots are required;
useSyncExternalStoreprovides React-compatible subscription semantics.
Part 3 β accessibility and testingβ
Taskβ
Review this component:
function IconButton({ icon, onClick }) {
return <div onClick={onClick}>{icon}</div>;
}
Find the accessibility and testing problems.
Strong answer:
divis not a button;- no keyboard behavior by default;
- no focusability by default;
- accessible name may be missing;
- prefer native
<button>; - test by role/name and keyboard interaction, not implementation details.
Follow-upβ
When is ARIA appropriate?
Expected:
- semantic HTML first;
- ARIA describes semantics/state/relationships when native elements cannot express the required widget;
- ARIA does not implement keyboard behavior or business logic.
Testing scenarioβ
A test uses:
fireEvent.click(screen.getByTestId('submit'));
expect(mockFn).toHaveBeenCalled();
How would you improve it?
Strong answer:
- prefer role/name query;
- use user-level interaction when appropriate;
- assert visible behavior/outcome rather than only internal callback invocation;
- include pending/error/success state where relevant.
Part 4 β performance/debuggingβ
Scenarioβ
A data grid becomes sluggish after adding column resizing and live prices.
Ask the candidate to separate possible costs:
- high-frequency data updates;
- Context propagation;
- expensive row renders;
- layout measurement;
- virtualization absence;
- unnecessary object/function churn;
- network parsing;
- paint/layout cost;
- third-party grid behavior.
Strong process:
- capture a representative slow interaction;
- inspect browser Performance timeline and React profiling data;
- identify update frequency and expensive subtrees;
- isolate live data from unrelated UI;
- add selective subscription/virtualization/memoization only where evidence supports it;
- remeasure.
Part 5 β frontend system designβ
Design prompt: collaborative analytics workspaceβ
Requirements:
- authenticated users;
- multiple organizations;
- shareable dashboard URLs;
- draggable widgets;
- live metrics;
- filters;
- autosaved layouts;
- permission-aware actions;
- large tables;
- offline/reconnect awareness;
- accessibility;
- audit events;
- feature flags.
Candidate should coverβ
State modelβ
Classify:
- URL state;
- local interaction state;
- server state;
- external realtime state;
- optimistic mutation state;
- session/auth state;
- ephemeral drag state.
Component boundariesβ
Discuss:
- shell/layout;
- dashboard feature modules;
- widget contracts;
- error boundaries;
- Suspense/loading boundaries;
- platform services.
Data flowβ
Discuss:
- initial load;
- live updates;
- mutation conflicts;
- cache invalidation;
- reconnect behavior;
- request ordering;
- tenant authorization.
Performanceβ
Discuss:
- selective subscriptions;
- virtualized tables;
- code splitting;
- lazy widgets;
- scheduling non-urgent updates;
- measurement strategy.
Accessibilityβ
Discuss:
- keyboard drag alternative;
- focus management;
- semantic controls;
- live-update announcements only when useful;
- accessible chart summaries.
Testingβ
Discuss:
- pure logic tests;
- component behavior tests;
- integration tests for data flow;
- E2E critical workflows;
- accessibility automation + manual keyboard testing.
Observabilityβ
Discuss:
- frontend error telemetry;
- recoverable hydration issues if server-rendered;
- performance metrics;
- feature/release correlation;
- realtime connection health.
Constraint changesβ
Introduce one at a time:
- Widgets now come from third-party teams.
- Dashboard must support 200 widgets.
- Data updates 10 times per second.
- Product wants offline editing.
- The app is moving from client-only rendering to SSR.
- Five teams need independent deploy ownership.
The candidate should adapt the architecture rather than defend the original design at all costs.
Scoringβ
A strong senior frontend candidate:
- understands browser behavior, not only React APIs;
- includes accessibility and testing in design;
- treats performance as measurement-driven;
- separates state categories;
- discusses failure modes;
- can evolve the design when constraints change.
A staff-level answer additionally addresses team boundaries, platform contracts, migration sequencing, and observability standards.