Front End DeveloperInterview Answers
Common Interview Questions
I've built production React applications for [X years], working with functional components, hooks (useState, useEffect, useContext, useMemo, useCallback, custom hooks), and state management patterns (Context API, Redux Toolkit, Zustand). I understand the React rendering model deeply — I can reason about when re-renders occur and how to prevent unnecessary ones. I've also worked with Next.js for server-side rendering and static generation, which adds significant complexity around data fetching, hydration, and deployment.
Performance starts with measurement: Lighthouse scores, Web Vitals (LCP, FID/INP, CLS), and user-centric metrics. I optimise bundle size (code splitting, tree shaking, dynamic imports), image delivery (WebP, lazy loading, responsive images via srcset), and rendering performance (memoization, virtualization for long lists). I audit and reduce third-party scripts. I set performance budgets in CI so regressions are caught before deployment. Performance is a feature, and maintaining it requires continuous vigilance.
I design mobile-first and use a combination of CSS Grid, Flexbox, and responsive units (rem, %, vw/vh, clamp()). I test on real devices and in Chrome DevTools device emulation. For cross-browser compatibility, I use Can I Use for feature support checks, and I test in Chrome, Firefox, Safari, and Edge. I use PostCSS and autoprefixer for vendor prefixes. I treat IE11 support discussions as a business decision with real cost implications — I present the trade-offs clearly rather than simply saying yes or no.
I design components for reusability and single responsibility. I separate presentational components (dumb, no side effects) from container components (data fetching, state management). I use a design system or component library as the foundation and build application-specific components on top. I think about the component API from the consumer's perspective: clear, minimal, well-typed props. I document components with Storybook so designers and other engineers can discover and understand them. Good component design reduces duplication and makes codebases maintainable as they scale.
I build accessibility in from the start: semantic HTML as the foundation (nav, main, section, button, not just divs), ARIA attributes where HTML semantics aren't sufficient, visible focus states, sufficient colour contrast (WCAG AA at minimum), keyboard navigability for all interactive elements, and screen reader testing (VoiceOver, NVDA). I use axe-core or Lighthouse for automated accessibility checks in CI. I treat accessibility as a quality dimension, not a compliance checkbox — accessible interfaces are usually better for everyone.
I've worked with CSS Modules, BEM, CSS-in-JS (styled-components, Emotion), and utility-first frameworks (Tailwind CSS). My preference depends on the project: Tailwind for design-system-driven products, CSS Modules for component isolation in large teams, CSS-in-JS for highly dynamic styling. I understand the CSS cascade, specificity, and stacking context deeply — most CSS bugs come from misunderstanding these. I use custom properties (CSS variables) for theming and design tokens to maintain consistency.
I engage with design early — before designs are finalised. I review Figma designs and flag implementation concerns (animation complexity, responsive behaviour gaps, accessibility issues) during the design phase, not during development. I speak the designer's language: I can discuss visual design concepts, type scales, and layout systems. I also implement designs precisely: pixel-level attention to spacing, typography, and colour matters. When I'm forced to deviate from design due to constraints, I communicate clearly and ensure alignment.
I test user-visible behaviour, not implementation details. I use React Testing Library for component testing — simulating user interactions and asserting on output. I write integration tests for key user flows (login, checkout, form submission) using Cypress or Playwright. For utility functions, I write unit tests with Jest. I mock external dependencies (API calls) in component and integration tests using MSW (Mock Service Worker). I avoid testing implementation details that make tests brittle — tests should give confidence, not create maintenance burden.
Ready to create your own?
Upload your CV and a job description to generate a tailored version in under 60 seconds.
Would you like suggested answers to expected questions for a job you've applied for?
Load your submitted CV and / or the job description