Frontend Engineer · interview questions
Frontend Engineer interview questions: comparison
From the role's core and recommended topics, most asked first. Filter by the kind of answer the question wants.
React Developer Core 24
- Most asked Explain React concept: controlled vs uncontrolled inputs.
- Most asked What does `useState` do and when should you use it?
- Most asked What does `useEffect` do and when should you use it?
- Most asked What does `useContext` do and when should you use it?
- Most asked What does `useRef` do and when should you use it?
- Most asked What does `custom hooks` do and when should you use it?
- Most asked What does `rules of hooks` do and when should you use it?
- Most asked What does `useMemo` do and when should you use it?
- Most asked What does `useCallback` do and when should you use it?
- Most asked When do you NOT need `useEffect`?
- What does `effect dependency mistakes` do and when should you use it?
- What does `cleanup in effects` do and when should you use it?
- Explain React concept: React elements vs components.
- Explain React concept: composition vs inheritance.
- What does `useReducer` do and when should you use it?
- What does `useTransition` do and when should you use it?
- Discuss Redux vs Context in React applications.
- Which accessibility practices matter most in React apps?
- What does `useLayoutEffect` do and when should you use it?
- What does `useId` do and when should you use it?
- What does `useDeferredValue` do and when should you use it?
- How do render props and higher-order components compare with custom hooks?
- When would you use `useImperativeHandle`?
- What is the difference between state and props in React?
TypeScript Developer Core 18
- Most asked Which built-in utility types do you use most, and what do they do?
- Most asked What does the `satisfies` operator do and how does it differ from a type annotation?
- Most asked Should you use enums or union types in TypeScript?
- Most asked Which `tsconfig` strictness options matter and what do they catch?
- Most asked What are type assertions (`as`) and the non-null assertion (`!`), and why should you use them sparingly?
- Most asked What are intersection types and how do they differ from interface extension?
- How do module systems (ESM vs CommonJS) interact with TypeScript settings?
- How do `tsc`, esbuild, SWC and Babel differ for TypeScript builds?
- What's the difference between an optional property (`x?: T`) and `x: T | undefined`?
- How do TypeScript access modifiers compare with JavaScript private fields?
- When would you use an abstract class versus an interface in TypeScript?
- What's the difference between `// @ts-ignore` and `// @ts-expect-error`?
- How do you type JSON values or recursive structures?
- What's the difference between `object`, `Object` and `{}` types?
- Should you use namespaces in modern TypeScript?
- What's the difference between `const`, `readonly` and `as const`?
- What's the difference between `string[]`, `Array<string>` and `[string]`?
- When should a function accept a union parameter versus using overloads?
HTML & CSS Core 13
- Most asked What is the difference between script, script async and script defer?
- Most asked Compare localStorage, sessionStorage and cookies.
- Which head tags matter for SEO and social sharing?
- Why set width and height on images, and when should you use loading="lazy"?
- What is the difference between a tag, an element and an attribute?
- What is the difference between block and inline elements?
- When should you use id and when class?
- What is the difference between article, section and div?
- What is the difference between absolute and relative URLs?
- What is the difference between GET and POST in an HTML form?
- What is the difference between canvas and SVG?
- What is the difference between strong and b, and between em and i?
- When do you use ul, ol and dl?
Next.js Developer Core 12
- Most asked What is the difference between Server Components and Client Components?
- Most asked What are Route Handlers and when should you use them instead of Server Actions?
- Which props can be passed from a Server Component to a Client Component?
- What's the difference between the Node.js and Edge runtimes in Next.js?
- What's the difference between React's `cache()` and Next.js's `unstable_cache`?
- How do API Routes in the Pages Router differ from Route Handlers?
- When does `<Link>` prefetch, and how can you control it?
- When would you use a custom Node server with Next.js, and what do you lose?
- How does Next.js compare with Remix/React Router v7 and Astro?
- When would you use `template.tsx` instead of `layout.tsx`?
- Compare Auth.js, Clerk and rolling your own authentication in Next.js.
- How do you rate limit Server Actions or Route Handlers in Next.js?
Vue.js Developer Recommended 8
- Most asked Options API or Composition API: what is the difference, and which would you use?
- Most asked ref or reactive: what is the difference, and when do you use each?
- Most asked How does Vue 3's reactivity system work, and how does it differ from Vue 2's?
- Most asked Pinia or Vuex: what is the difference, and why is Pinia now recommended?
- Most asked v-if or v-show: what is the difference?
- Most asked Vue or React: how would you compare them?
- What are provide and inject, and when should you use them?
- When would you write a custom directive?