Skip to content
tezvyn:

🌐Frontend Dev

Frontend web development and UI engineering

537 bites

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

Interview questions in Frontend Dev, page 12

intermediate1 min read

What is PostCSS and how it differs from Sass

PostCSS is a plugin-driven tool that parses CSS into an AST and transforms it; it is not a fixed language like Sass but a platform for plugins like autoprefixer.

easy2 min read

How does Vue v-model work syntactically under the hood?

Tests if you know v-model is syntax sugar over prop and event pairs. Strong answers map text to :value/@input, checkboxes to :checked/@change, selects to value/@change, and note JS state wins. Red flag: calling it magic or true two-way binding.

How do you cancel pending fetches using AbortController?
advanced2 min read

How do you cancel pending fetches using AbortController?

Keep one AbortController, abort before each fetch, pass its signal, and swallow AbortError.

intermediate2 min read

How does Next.js routing auto-implement code splitting?

Tests route-based code splitting versus manual setup. Strong answers note each page/route becomes its own chunk automatically, while client-only apps need explicit React.lazy and Suspense.

intermediate2 min read

Build a DRY button with Sass maps and mixins

A base mixin for shared button styles, a variants map of name to colors looped to generate modifiers, and a sizes map looped for sizing.

Key differences between Template-Driven and Reactive Forms in Angular
easy2 min read

Key differences between Template-Driven and Reactive Forms in Angular

This tests Angular form architecture tradeoffs. Contrast explicit synchronous reactive models with implicit asynchronous template-driven ones; assign reactive to scalable dynamic forms and template-driven to simple inputs.

When does fetch trigger a CORS preflight, and what POST is complex?
advanced2 min read

When does fetch trigger a CORS preflight, and what POST is complex?

Tests whether you know the simple-request boundary. A strong answer names the three safe POST content-types and gives a cross-origin POST with application/json plus a custom header like Authorization.

React Profiler long render duration: causes and next steps?
intermediate2 min read

React Profiler long render duration: causes and next steps?

Tests interpreting actualDuration vs baseDuration. Outline: close values on updates mean broken memoization—add memo or useMemo; high baseDuration alone means an inherently slow subtree. Red flag: proposing fixes before comparing these two Profiler metrics.

intermediate2 min read

What does autoprefixer do and why?

Autoprefixer is a PostCSS plugin that adds vendor prefixes to CSS based on a browserslist target using compatibility data, so you write standard CSS and it handles support.

Bind an input to a variable and validate with reactivity
easy2 min read

Bind an input to a variable and validate with reactivity

Tests Svelte reactivity: connecting DOM state to validation logic. Good answer: $state for the variable, $effect to run validation when it changes, cleanup if needed. Red flag: using effects where event handlers suffice or creating infinite loops.

Download a large file via fetch and track ReadableStream progress
advanced2 min read

Download a large file via fetch and track ReadableStream progress

It tests streaming I/O and backpressure beyond Promise-based fetch. Acquire a reader from response.body, loop read() until done, sum chunk lengths against Content-Length, and emit progress.

How would you avoid new functions per list item without useCallback?
advanced2 min read

How would you avoid new functions per list item without useCallback?

Tests stable handler patterns for large lists. Answer: define one handler outside the map, attach it to every item, and read the id from a data-id attribute via currentTarget.dataset.id. Or use event delegation on the parent. Red flag: useCallback in loop.

advanced1 min read

Build a scalable Sass theming system

Store themes as maps, emit values as CSS custom properties so runtime switching needs no recompile, generate per-theme scopes via mixins.

intermediate2 min read

Validate matching Vue passwords: computed property or watcher?

Use a computed boolean for caching and dependency tracking; reserve watchers for side effects only.

easy2 min read

Refactor a function using generics to accept any array type

It tests generic type parameters for preserving element types through a function boundary. Answer: declare T, accept T[], return T, and let the compiler infer the element type from the call site.

advanced2 min read

Explain list virtualization and when it beats React.memo

This tests whether you know React.memo skips re-renders but leaves off-screen nodes in the DOM. A strong answer describes virtualization mounting only visible items to cut memory use. A red flag is claiming memoization fixes jank or saves memory for big lists.

advanced1 min read

Diagnose and shrink a large CSS bundle

Purge unused selectors, minify and merge with cssnano, split critical CSS and code-split per route.

intermediate2 min read

How do you debounce input for API validation in Vue or Angular?

Tests reactive stream control and cancellation. A strong answer uses debounceTime at 300ms, switches with switchMap, and handles loading and error states. Red flag: using setTimeout without cleanup or ignoring race conditions.

easy2 min read

Explain generic constraints and provide a length-constrained generic example

Explain that extends requires properties; show T extends { length: number }; give a generic function signature.

easy2 min read

When would you choose Redux or Zustand over React's built-in hooks?

Choose global state when many components share rapidly changing state, logic is complex, or updates must be traceable.

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