# Frontend Developer interview questions

Canonical URL: https://career1.ai/interview-questions/frontend-developer · Publisher: Career1 (Answerflix Ltd)

Frontend interviews have moved on from trivia about CSS specificity. They now test whether you can keep an application fast and usable as it grows.

Interviewers are looking for someone who understands what the browser is doing, treats accessibility as part of the work, and has opinions about state that came from a codebase rather than a conference talk.

## How this interview usually runs

1. **Screening call.** The products you have worked on, your framework, and how much of the work was yours.
2. **Coding exercise.** Build a small component or interface from a description, live or as a take-home. Sometimes a plain JavaScript exercise with no framework at all.
3. **Frontend system design.** Mostly at mid and senior level: design something like an autocomplete, a feed or a multi-step form, covering data fetching, state, performance and accessibility.
4. **Experience and collaboration.** A performance or accessibility problem you fixed, how you work with designers, and how you review code.

## How the browser actually works

### What happens between a user clicking a link and seeing content?

What a strong answer shows: Depth of mental model: request, parse, render, hydrate. It scales from junior to staff depending on how far you go.

### Something feels janky when scrolling. How do you diagnose it?

What a strong answer shows: Whether you reach for the performance profiler, and know layout thrash and long tasks by sight.

### What causes layout shift, and how do you prevent it?

What a strong answer shows: Images and embeds without reserved space, late-loading fonts and content injected above what the user is reading. Width and height attributes or aspect-ratio, and checking CLS in field data.

## Performance

### How would you make a page's largest contentful paint faster?

What a strong answer shows: Practical levers: image sizing and format, render blocking resources, font loading, and what you would measure first.

### What is INP, and how would you improve a poor score?

What a strong answer shows: That Interaction to Next Paint replaced First Input Delay as a Core Web Vital in 2024 and measures responsiveness across the whole visit. Fixes: breaking up long tasks and doing less work in event handlers.

### Your JavaScript bundle has doubled in size. How do you find out why?

What a strong answer shows: A bundle analyser, looking for duplicated or accidentally imported libraries, code splitting by route, and a size budget in CI so it cannot happen quietly again.

### How would you render a list of ten thousand rows?

What a strong answer shows: Virtualisation or pagination, or asking whether anyone needs ten thousand rows at once, plus stable keys and not re-rendering every row on each change.

## JavaScript and TypeScript

### Explain closures with a bug you have seen them cause.

What a strong answer shows: A stale closure: a handler or effect that captured an old value of state. Anyone who writes React daily usually has one ready.

### What is the difference between debouncing and throttling?

What a strong answer shows: Debouncing waits for a pause; throttling caps how often something runs. Then choosing correctly: debounce a search input, throttle a scroll handler.

### What problem does event delegation solve?

What a strong answer shows: One listener on a parent handling events from many children through bubbling, useful for long or dynamic lists, and knowing that some events such as focus do not bubble.

### How do you type component props so misuse fails at compile time?

What a strong answer shows: Discriminated unions for props that only make sense together, avoiding any, and knowing where TypeScript stops helping: data from the network still needs validating at runtime.

## State and architecture

### When does a component need global state, and when is that a mistake?

What a strong answer shows: Restraint. Everyone can add a store; fewer can say why most state belongs where it is used.

### How do you handle server state versus client state?

What a strong answer shows: Whether you have felt the pain of caching and invalidation, or copied a pattern without hitting its edges.

### How do you fetch data in a component without race conditions?

What a strong answer shows: Handling responses that arrive out of order by aborting the previous request or ignoring stale results. A search box showing results for an old query is the classic bug.

### When would you render on the server instead of the client?

What a strong answer shows: Trade-offs rather than fashion: first load and search visibility against server cost, hydration cost, and which parts of the page really need to be interactive.

### How do you build a form with complex validation?

What a strong answer shows: Validation timed to help rather than nag, errors tied to their fields and announced to assistive technology, the server as the source of truth, and never losing what someone typed.

### How do you keep a component library from becoming unusable?

What a strong answer shows: Experience of maintenance: API design, escape hatches, and what happens when a design changes.

## Accessibility and quality

### How do you make a custom dropdown accessible?

What a strong answer shows: Whether accessibility is something you build in or bolt on. Keyboard handling and focus management come up fast.

### When should you use ARIA, and when is it a mistake?

What a strong answer shows: That native HTML elements come first and ARIA fills the gaps, because a wrong role or state is worse than none. A real case, such as tabs or a live region, makes the answer.

### How do you manage focus when a modal opens and closes?

What a strong answer shows: Moving focus into the dialog, keeping it there, closing on Escape and returning focus to whatever opened it. Knowing the native dialog element handles much of this is a plus.

### How do you check that a page is accessible?

What a strong answer shows: Automated checks such as axe for what can be automated, then keyboard-only use and a screen reader for the rest. Stopping at a tool's score means the second half never happened.

### What do you test in frontend code, and what do you not bother testing?

What a strong answer shows: Judgement about brittle snapshot suites versus tests that catch real regressions.

## Questions people ask

### Do frontend interviews still ask CSS trivia?

Less often. Stronger teams ask you to reason about layout and rendering instead. Flexbox and grid still come up, but usually inside a practical problem rather than as a definition.

### How much JavaScript framework knowledge do I need?

Enough to explain the trade-offs of the one you use. Teams generally assume you can learn theirs; what they cannot teach quickly is a mental model of the browser.

### What is the most common reason frontend candidates fail?

Describing what a framework does rather than what they decided. Interviewers are listening for the constraint behind a choice.

### Do frontend interviews include system design?

At mid and senior level, often. Expect to design something like an autocomplete, a feed or a multi-step form, and to talk through data fetching, loading and error states, performance and accessibility rather than servers.

## Other roles

- [Interview questions and answers](https://career1.ai/interview-questions)
- [Data Engineer interview questions](https://career1.ai/interview-questions/data-engineer)
- [Node.js Developer interview questions](https://career1.ai/interview-questions/nodejs-developer)
- [AI Engineer interview questions](https://career1.ai/interview-questions/ai-engineer)
- [Python Developer interview questions](https://career1.ai/interview-questions/python-developer)
- [UX Designer interview questions](https://career1.ai/interview-questions/ux-designer)
- [Customer Success Manager interview questions](https://career1.ai/interview-questions/customer-success-manager)

## About Career1

Job seekers use Career1 for free: they upload a resume, practise privately with the AI interviewer, then take one vetting interview whose verified profile companies hiring through Career1 can search, unless they choose to hide it.
