Most frontend interviews still test the same spine: can you explain what the browser does, what JavaScript guarantees (and does not), and whether you can ship React without turning every screen into a re-render festival. The banner says React; the list below is frontend-wide with a heavy React block — because that is what hiring loops actually mix together in 2026.
Target keywords: react interview questions 2026 (primary); frontend interview questions, javascript interview questions, react hooks interview, frontend developer cheat sheet (long-tail).
If you are switching lanes from “classic web” into agent-heavy products, pair this sheet with the AI Agent Developer roadmap — interviewers increasingly ask how you would embed LLM UIs, streaming, and tool calls without wrecking bundle size or auth flows (Firebase, Supabase, and Clerk is a practical comparison we published for that exact decision).
How to use this list
Do not memorize 50 paragraphs. For each item, practice saying the one-line answer out loud, then add one example from a project you shipped. Interviewers care that you can connect theory to a bug you actually fixed.
For deeper dives on the hardest JavaScript topic here, read our Event Loop thread — it is the single post on iHateReading most aligned with live coding loops.
HTML & CSS (10 questions)
-
What does
<!DOCTYPE html>do? — Tells the browser to use standards mode instead of quirks mode so layout matches modern CSS specs (MDN: DOCTYPE). -
Why use semantic tags (
<main>,<nav>,<article>)? — Screen readers and search engines get structure; you write less div soup. -
Explain the CSS box model. — Every element is content + padding + border + margin;
box-sizing: border-boxmakes width include padding and border. -
Flexbox vs CSS Grid — when which? — Flex for one-dimensional alignment (rows or columns); Grid for two-dimensional layouts (MDN: Grid).
-
What is specificity? — Inline > IDs > classes/attributes/pseudo-classes > elements; ties broken by source order.
-
remvsem? —remis relative to root font size (stable for spacing);emcompounds with nested font sizes. -
What creates a Block Formatting Context (BFC)? — Floats, absolute positioning,
overflownotvisible, flex/grid items — contains margins and clears floats. -
:hoveron mobile — pitfalls? — Touch devices may “stick” hover; prefer:focus-visibleand explicit tap targets. -
What is a CSS containment /
content-visibilitywin? — Skips layout/paint for off-screen sections; pairs with scroll-driven UI patterns like CSS scroll and view animations in six lines. -
How do you avoid layout shift (CLS)? — Reserve space for images/fonts, avoid injecting content above existing UI, measure with Lighthouse (web.dev: CLS).
JavaScript fundamentals (12 questions)
-
varvsletvsconst? — Function-scoped vs block-scoped;constbinds a reference, not immutability of objects. -
What is hoisting? — Declarations are registered before execution;
let/conststay in temporal dead zone until their line runs. -
Explain closures. — A function that closes over variables from an outer scope — used for factories, private state, and event handlers.
-
How does the event loop order work? — Run call stack → drain microtasks (Promises) → take one macrotask (timers, I/O) → repeat; see our Event Loop guide for interview-safe wording.
-
Promisevsasync/await? — Same underlying mechanism;async/awaitis syntactic sugar that reads like synchronous code. -
Shallow vs deep copy? — Shallow duplicates top-level references; deep copy clones nested structures (
structuredClone, libraries, or immutable patterns). -
==vs===? — Strict equality avoids coercion surprises; default to===in application code. -
What is the prototype chain? — Objects delegate missing properties to
[[Prototype]]; classes are syntactic sugar over prototypes. -
How does
thisbind? — Depends on call site: default, implicit object, explicitcall/apply/bind, ornew. -
Debounce vs throttle? — Debounce waits for quiet period (search input); throttle caps rate (scroll/resize handlers).
-
ES modules vs CommonJS? — Static
import/export(tree-shakeable) vs runtimerequirein Node legacy bundles. -
Why can
typeof null === "object"? — Historical bug in JS; usevalue === nullorObject.prototype.toStringwhen it matters.
React core (18 questions)
-
What problem does React solve? — Declarative UI from state; the runtime reconciles DOM updates efficiently (React docs: Describing the UI).
-
Virtual DOM — still the right phrase? — React builds a fiber tree and schedules updates; “virtual DOM” is shorthand for diff + commit.
-
What is JSX? — Syntax sugar for
React.createElement; must compile to JS. -
useState— why not mutate state directly? — Mutation skips re-render scheduling; always replace with a new reference for objects/arrays. -
useEffectdependency array — empty vs omitted? —[]runs once after mount; omitted runs every render; include every reactive value you read. -
When
useMemovsuseCallback? — Memoize expensive values vs stable function references passed to optimized children; do not sprinkle by default. -
Why do list keys matter? — Keys tell React which items moved/merged; index keys break with reorder/filter.
-
Controlled vs uncontrolled inputs? — React state drives value (controlled) vs DOM holds value (uncontrolled + refs).
-
What is reconciliation? — Diffing old vs new element tree to compute minimal DOM operations.
-
React Fiber — one sentence. — Incremental, interruptible rendering so high-priority updates (input) can preempt heavy work.
-
SSR vs CSR vs SSG? — HTML on server per request vs client-only render vs HTML at build time; hybrids use frameworks like Next.js (Next.js docs).
-
What changed with React 18 concurrent features? —
startTransition, Suspense boundaries, and streaming SSR for smoother UX under load. -
Error boundaries — what they catch. — Render/lifecycle errors in children, not event handlers or async code unless rethrown into render.
-
Context vs global store (Redux/Zustand)? — Context broadcasts slow-changing data; dedicated stores help frequent fine-grained updates and devtools.
-
Custom hooks — rules. — Prefix
use, call only at top level, compose other hooks — share stateful logic, not JSX. -
React.lazy+Suspense? — Code-split components; show fallback while chunk loads — ties directly to bundle-size discipline. -
Why Strict Mode double-invokes in dev? — Surfaces unsafe side effects; not production behavior.
-
Server Components (RSC) — high level. — Components that run on server, ship minimal JS; client components handle interactivity (React: Server Components).
TypeScript & tooling (4 questions)
-
interfacevstypein TS? — Interfaces merge and extend cleanly for object shapes; types excel at unions/intersections and mapped types. -
What are generics for? — Reusable APIs that preserve type relationships (
Array<T>, fetch wrappers, hooks). -
What does
"strict": truebuy you? — Catches null/undefined slips, implicitany, and unsafe assumptions at compile time. -
Starting a greenfield app in 2026? — Pick a maintained starter (free Next.js boilerplates we compared) instead of copying CRA patterns — and know when jQuery still shows up in legacy stacks.
Web platform, HTTP & security (6 questions)
-
What is CORS? — Browser-enforced cross-origin rules; server must send allowed origins/headers/methods (MDN: CORS).
-
REST vs GraphQL — tradeoff. — REST maps resources to URLs; GraphQL lets clients shape one request — costs schema governance and caching complexity.
-
localStoragevssessionStoragevs cookies? — Persistent origin storage vs tab session vs HTTP cookie jar with size/security flags. -
XSS — how to prevent? — Escape output, sanitize HTML, use CSP, prefer framework auto-escaping, never
dangerouslySetInnerHTMLwith user input. -
CSRF — basics. — Cross-site form/API abuse; mitigate with SameSite cookies, CSRF tokens, and OAuth state parameters.
-
HTTP caching headers — name two. —
Cache-Control(policy) andETag/If-None-Match(validation) reduce bandwidth on repeat visits.
After the interview: what to build next
Frontend loops in 2026 often end with “show us a side project.” Useful adjacent paths on iHateReading:
- Ship UI faster — 50+ React code components you can paste into an existing repo (no CLI).
- Understand agent UI, not just buttons — Agent harnessing explains the wrapper code around models (tools, memory, sandbox) that full-stack “AI features” actually need.
- Find roles — Jobs portals lists 50+ boards; our Jobs page curates individual listings.
- Stay current — Frontend section of the magazine or the full React topic hub.
If you want a structured path instead of scattered threads, browse all roadmaps — the AI Agent Developer track is the one to open when the job description mentions Copilot-style features, MCP tools, or in-app agents.
Quick self-check before the loop
- Can you whiteboard the event loop with one timer and one Promise?
- Can you explain one React performance fix you shipped (memoization, split bundle, virtualization)?
- Can you describe one auth choice (session cookie vs JWT in memory) without hand-waving?
If any of those stall, pick three questions from this list, write a five-sentence answer, and link out to the iHateReading threads above — that is enough for a focused evening of prep.
Good luck — and if you land the role, send us a note via contact; we feature builder stories in the monthly magazine when they teach something concrete.