Skip to content
Tech Interview Prep

Frontend Engineer Interview Prep

Overview

Builds and owns accessible, performant browser applications, from component APIs and state flow to rendering behavior and production reliability.

Curated: · Written: · Reviewed:

Interview Q&A
102
Practice MCQs
105

The role in one line

You build and own the browser application users touch: component APIs, state flow, rendering behaviour and production reliability, with accessibility and performance treated as requirements rather than polish.

The interview loop

RoundWhat it scores
Recruiter screenScope fit, seniority signals, timeline
JavaScript and UI codingEvent handling, async correctness, state updates, edge cases named before coding
React or component designComponent API, state ownership, composition, loading and error states
Frontend system designRequirements, data flow, caching, rendering strategy, test seams, trade-offs
Accessibility and performance reviewSemantic HTML, keyboard and focus, diagnosis of Core Web Vitals from evidence
BehaviouralSTAR stories with measured outcomes and what you would change

Round names and weighting vary by company; confirm the loop with the recruiter.

Five must-know areas

  • Event loop ordering: what runs before a paint, and why a long task delays input.
  • Async races: stale responses, cancellation with AbortController, latest-request-wins.
  • Closures and this: how captured state goes stale in callbacks and effects.
  • Rendering cost: why a state change re-renders a subtree, and when memoisation helps or hurts.
  • Browser quality signals: LCP, INP and CLS, plus focus order and semantic markup.

Numbers and formulas to have ready

  • Good Core Web Vitals thresholds, judged at the 75th percentile of field data: LCP 2.5 s or less, INP 200 ms or less, CLS 0.1 or less.
  • Frame budget at 60 Hz, which is the time left for script, style, layout and paint in one frame:
tframe=1000 ms60≈16.7 mst_{frame} = \frac{1000\ \text{ms}}{60} \approx 16.7\ \text{ms}
  • INP is reported per interaction and is close to the worst one on the page, so it is broken into phases:
INP≈tinput delay+tprocessing+tpresentation delay\text{INP} \approx t_{input\ delay} + t_{processing} + t_{presentation\ delay}
  • Debounce wait: there is no universal value. Derive it from typing cadence and your backend p95 latency, and say which you measured.

Reference architecture

The diagram shows the path from an input event to committed DOM for a search-style feature.

Input event State owner component Data hook with AbortController API client with auth and timeout Response cache Render tree with memoised leaves DOM commit
  • The state owner is the only component that writes the query; children receive props.
  • Each new request aborts the previous one, so a late response cannot overwrite newer state.
  • Memoisation sits on leaves that receive stable props, not on the whole tree.

Strong vs weak answers

QuestionStrong answer sounds likeWeak answer sounds like
Out-of-order resultsAbort the previous request, or ignore responses whose query no longer matches the latest input.Add a loading spinner.
Fetch in an effectCleanup sets a cancelled flag or aborts, and the dependency list is the query.Put it in useEffect with an empty array.
Debounce vs throttleDebounce waits for quiet, so it suits search. Throttle caps the rate, so it suits scroll or resize.They are the same thing with different names.
1,000 rowsVirtualise the list, keep one delegated listener, and measure INP before and after.Use React.memo everywhere.
MemoisationMemoise when the computation is expensive and the inputs are stable, and measure it.Memoise everything to be safe.

Interview tips

  1. Restate the requirement and its constraints before you propose a design.
  2. Name the edge case you are guarding against before you write the code.
  3. Back every performance claim with a metric and the tool that produced it.
  4. Cover keyboard, focus and screen reader behaviour in every component you design.
  5. Say what you would not build yet and why.

Last-week checklist:

  • Rewrite a fetch-on-input component with cancellation from memory.
  • Explain the event loop order of a promise, a zero-delay timeout and a paint, aloud.
  • Re-check the three Core Web Vitals thresholds and their percentile.
  • Prepare two STAR stories with a number in each result.
  • Work through the Top 100 questions aloud, then review concepts where your explanation broke down.

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.