Skip to content
tezvyn:

🌐Frontend Dev

Frontend web development and UI engineering

138 bites

Test yourself: Top 30 advanced Frontend Dev interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Advanced interview questions in Frontend Dev, page 3

Using CSS Grid, how do repeat, auto-fit, and minmax create responsive columns?
advanced2 min read

Using CSS Grid, how do repeat, auto-fit, and minmax create responsive columns?

Tests intrinsic sizing and responsive tracks without media queries. A strong answer gives repeat(auto-fit, minmax(250px, 1fr)), noting repeat generates tracks, auto-fit collapses empties, and minmax sets a floor with fractional growth.

How would you use DocumentFragment to optimize adding 1,000 list items?
advanced2 min read

How would you use DocumentFragment to optimize adding 1,000 list items?

Tests DOM reflow/repaint costs and off-DOM batching. A strong answer: create a DocumentFragment, build the 1,000 nodes off-DOM, then append once to trigger a single reflow. Red flag: claiming it saves memory or confusing it with innerHTML batching.

Implement IntersectionObserver in TypeScript for lazy-loading images
advanced2 min read

Implement IntersectionObserver in TypeScript for lazy-loading images

Tests precise DOM typing and observer lifecycle. A strong answer types the callback as receiving IntersectionObserverEntry[], narrows entry.target to HTMLImageElement, swaps data-src to src, and calls unobserve.

advanced2 min read

Explain Shallow Routing in Next.js Pages Router

This tests URL updates without re-running getServerSideProps or getStaticProps in the Pages Router. A strong answer defines shallow: true, cites query-state UI like filters or modals, and notes same-page and App Router limits.

advanced2 min read

Write a generic TypeScript handler for mixed form inputs?

Tests TypeScript DOM narrowing. Strong answer: union-type ChangeEvent, narrow target with instanceof or tag checks, branch on element.type to read .checked for checkboxes or .value otherwise. Red flag: casting to any or assuming all inputs use .value.

advanced2 min read

How do you handle 404s in React Router and Next.js App Router?

Tests client versus server routing architecture. React Router uses a wildcard route returning HTTP 200 by default; Next.js App Router uses not-found.js for server-rendered 404s. Red flag: confusing the two routers or ignoring status code semantics.

How do you programmatically sync CSS animation progress to scroll?
advanced2 min read

How do you programmatically sync CSS animation progress to scroll?

This tests scroll-driven APIs beyond legacy scroll listeners. A strong answer names CSS animation-timeline and scroll-timeline declaratively, plus the Web Animations API with ScrollTimeline in JS. A red flag is using only requestAnimationFrame style mutations.

How should you adapt animations for prefers-reduced-motion?
advanced2 min read

How should you adapt animations for prefers-reduced-motion?

Scope motion to no-preference, swap scaling for opacity or instant cuts, keep functional changes visible.

advanced2 min read

Compiler vs runtime reactivity: Svelte, Vue, Angular?

Svelte compiles away reactivity (smaller bundles, zero-cost), Vue/Angular use runtime Proxies/zone.js (flexible but heavier).

advanced2 min read

How do you structure and tokenize animation and transition values?

This tests semantic token architecture for motion. Structure duration and easing into tiered tokens: primitive values, semantic aliases like feedback or navigation, and component bindings. Avoid hardcoding values or using only raw milliseconds without meaning.

advanced2 min read

Implement auto-cleanup reactive logic in Vue's Composition API and Svelte

Vue pairs onMounted with onUnmounted or watchEffect cleanup; Svelte uses $store auto-subscription or onDestroy.

How would you prevent search-as-you-type race conditions with AbortController?
advanced2 min read

How would you prevent search-as-you-type race conditions with AbortController?

Abort the previous request before each new keystroke, pass the fresh signal into fetch, and ignore the AbortError.

Implement inSequence(tasks) to execute promise-returning functions sequentially
advanced2 min read

Implement inSequence(tasks) to execute promise-returning functions sequentially

Tests async/await control flow versus Promise.all parallelism. A strong answer uses a for-of loop with await inside an async function, accumulates results in order, and stops cleanly on rejection. Red flag: suggesting Promise.all or forEach with await.

advanced1 min read

Should a component own its outer spacing?

Components own internal padding but should not own external margin; the parent or layout owns spacing between siblings, keeping components context-independent.

Optimize a large form with frequent state updates
advanced2 min read

Optimize a large form with frequent state updates

Tests render propagation and memoization discipline. Strong answers note parent updates re-render children, extract inputs to localize state, useMemo for derived values, and stable callbacks. Red flag: useMemo everywhere without component boundaries.

advanced2 min read

Utility-first versus semantic CSS trade-offs

Utility-first gives speed, small purged bundles, and no naming overhead but verbose markup; semantic BEM gives readable markup and clear boundaries but naming and dead-CSS risk.

Design a multi-step wizard form pattern in React
advanced2 min read

Design a multi-step wizard form pattern in React

Shared state, step validation, and resilient navigation. A great answer uses one form instance with per-step Zod schemas, a context stepper, and localStorage persistence. Red flag: isolated forms per step that lose data on navigation.

advanced1 min read

Using :is() and :where() to manage specificity

:is() groups selectors and takes its most specific argument's specificity, :where() does the same grouping but contributes zero specificity, ideal for easily overridable defaults.

Shadow DOM vs build-time scoping for third-party widgets
advanced2 min read

Shadow DOM vs build-time scoping for third-party widgets

Shadow DOM gives true isolation but blocks global theming and complicates SSR; build-time scoping keeps theming and SSR simple but needs tooling.

advanced2 min read

How does Vue's v-bind() CSS function work in style blocks?

Tests Vue SFC CSS transforms and browser primitives. Strong answer: Vue compiles v-bind() to scoped CSS custom properties, letting reactive values work with pseudo-selectors and media queries.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles