Skip to content
QSWEQB

Frontend Engineering interview questions

Browser-platform depth, framework reasoning, and the frontend-specific design round that full-stack candidates are least prepared for.

14 published across 9 topics.

Frontend fundamentals57 short answers on one page, for revising rather than studying.

JavaScript Core

2 questions

Closures, the event loop, prototypes, coercion, and the async semantics in every frontend screen.

mediumConceptCoding

What is a closure, and how does one end up leaking memory?

A closure is a function plus the scope it was created in, held by reference rather than copied. It leaks when something long-lived keeps the function alive, because everything the captured scope can reach stays reachable with it.

4 minentry, mid, senior

TypeScript

2 questions

Structural typing, generics, narrowing, utility types, and typing component contracts.

mediumConceptCoding

How do you use TypeScript to make a component's props hard to misuse?

Model the component's legal states as a discriminated union so contradictory prop combinations do not typecheck, use a type parameter to tie related props like items and renderItem together, and keep any out of the public surface because one any erases the narrowing everything else depends on.

4 minmid, senior, staff
hardConcept

Where does TypeScript stop protecting you, and what do you do at those points?

Types are erased before the code runs, so anything crossing a boundary is unverified. The checker also has deliberate unsound spots - assertions, index access, bivariant method parameters, array covariance - so the answer is a validating parse per boundary plus knowing which flag closes which hole.

4 minmid, senior, staff

React

2 questions

Reconciliation, hook rules and dependency correctness, server components, and state management.

easyConcept

Why does my useEffect run twice on mount?

In development, Strict Mode deliberately runs one extra setup-cleanup-setup cycle for every effect so that missing cleanup becomes visible; it does not happen in production builds, and the fix is to write the cleanup the effect was missing rather than to guard the effect or remove Strict Mode.

5 minentry, mid

Angular & Vue

1 question

Change detection, reactivity models, DI and modules, and framework-specific lifecycle questions.

Browser & Rendering

1 question

The critical rendering path, reflow and repaint, event delegation, and storage and cookie mechanics.

Web Performance

2 questions

Core Web Vitals, bundle splitting, image strategy, and measuring rather than guessing.

hardConceptScenario

Field data says your page has an INP of 400 ms. How do you find the cause and fix it?

Split the interaction into input delay, processing time and presentation delay, then attribute a real interaction from the field rather than guessing. Most of the budget is usually spent before your handler runs or after it returns, so yielding and cutting rendering cost beats optimising the handler.

4 minmid, senior, staff

CSS & Layout

1 question

The cascade and specificity, flexbox and grid, stacking contexts, and responsive strategy.

Accessibility

2 questions

Semantics, keyboard interaction, ARIA use and misuse, and WCAG criteria raised in review.

mediumConceptCodingScenario

This form marks invalid fields with red text and a red border. What has to change?

Colour is not a signal on its own, so each error needs text, and that text must be programmatically tied to the field with aria-describedby and marked with aria-invalid. On submit, move focus to a summary or the first invalid field rather than hoping a live region is announced.

4 minentry, mid, senior

Frontend System Design

1 question

Component architecture, data-fetching and caching layers, and designing autocomplete or a feed client-side.

hardDesignCase Study

Design the frontend for a data-heavy operational dashboard with live updates.

Stream a server-rendered shell, virtualise the dense views and draw high-density charts to canvas, keep server cache separate from UI and URL state, coalesce socket messages into one commit per frame, give every widget its own empty, error and stale states, and enforce a byte budget per pull request.

7 minsenior, staff, lead