OctogleHire
← Interview questions library

25 React interview questions

Structure the React interview loop around evidence, not trivia. Start with a recruiter or hiring-manager screen to confirm product context, remote collaboration, and recent React experience. Use a technical discussion to probe component design, data fetching, state boundaries, accessibility, testing, and debugging in React 19 with TypeScript. Add a practical exercise, live or take-home, that mirrors your codebase constraints: API latency, forms, routing, and error states. For mid and senior candidates, include a React architecture interview focused on trade-offs such as server rendering, caching, bundle size, and design systems. End with a team interview that checks communication, code review habits, ownership, and how the candidate handles ambiguity.

Junior React questions

Fundamentals, learning speed and how they debug.

  1. 01You inherit a checkout form where typing in one field sometimes clears another field after an API validation call. How would you debug it in React?

    Listen for: A strong answer starts by reproducing the issue, checking whether inputs are controlled or uncontrolled, and inspecting state updates around the API response. Listen for use of React DevTools, console logging of state transitions, attention to stale closures, keys that remount fields, and separating local typing state from server validation state.

    Red flag: They immediately blame React or suggest rewriting the form without first isolating the state transition.

  2. 02A component uses useEffect to fetch data and sometimes shows old results after the user changes filters quickly. What would you change?

    Listen for: Look for awareness of race conditions and cleanup. Good candidates mention AbortController, tracking request identity, moving fetching to TanStack Query or React Router loaders, and rendering loading and error states per filter. They should understand that dependency arrays are not enough when responses can arrive out of order.

    Red flag: They say to remove dependencies from the effect to stop it from running.

  3. 03When would you keep state inside a component, lift it to a parent, put it in context, or use a library such as Zustand or Redux Toolkit?

    Listen for: A strong junior answer is practical: local state for isolated UI, lifted state for sibling coordination, context for stable cross-tree values such as theme or current user, and a state library for complex shared client state. They should mention avoiding context for frequently changing large objects without considering re-render impact.

    Red flag: They say all state should go into Redux or all state should stay local.

  4. 04A list of search results feels slow when the user types. What would you inspect before adding memo everywhere?

    Listen for: Listen for measuring first with React DevTools Profiler and browser performance tools. Good signals include checking expensive filtering, unstable props, oversized DOM output, unnecessary parent re-renders, and network latency. They may suggest debouncing input, useDeferredValue, pagination or virtualization, and memoization only around proven expensive work.

    Red flag: They present React.memo as a default fix without profiling or identifying the expensive work.

  5. 05How would you make a custom dropdown component usable by keyboard and screen-reader users?

    Listen for: The answer should cover focus management, Escape and arrow-key behavior, Enter or Space selection, visible focus styles, labels, roles only when they understand the pattern, and testing with keyboard and at least one screen reader. A strong candidate may prefer a native select when requirements allow it.

    Red flag: They only mention adding aria-label and consider the component accessible.

  6. 06What would you test for a React component that saves profile settings through an API?

    Listen for: Look for user-focused tests with React Testing Library: editing fields, validation messages, disabled or pending save state, success and error responses, and avoiding implementation details like internal state names. They should mention mocking network calls with MSW or equivalent and keeping tests resilient to markup refactors.

    Red flag: They focus only on snapshot tests or testing every hook call directly.

Mid-level React questions

Independent delivery, trade-offs and code quality.

  1. 07You need to build a React page with filters, pagination, optimistic updates, and server-side sorting. How would you structure data fetching and caching?

    Listen for: Strong answers separate server state from UI state and use a tool such as TanStack Query 5, React Router 7 data APIs, or framework loaders. Listen for query keys that include filters, cancellation, stale and invalidation strategy, optimistic rollback, error boundaries, and keeping URL search params shareable.

    Red flag: They store fetched data in a global client store and manually synchronize every request.

  2. 08A product team asks for a global state solution. What questions do you ask before choosing Context, Zustand, Redux Toolkit, or another option?

    Listen for: Good candidates clarify the shape of state, write frequency, debugging needs, persistence, derived data, async workflows, and team familiarity. They distinguish server cache from client state and consider devtools, selectors, testing, and bundle cost. The strongest answers choose the smallest abstraction that still supports maintainability.

    Red flag: They pick their favorite library before understanding the state model.

  3. 09Your Next.js app has hydration warnings and a button that works locally but not after deployment. How do you investigate?

    Listen for: Listen for comparing server-rendered and client-rendered output, checking nondeterministic values like dates, random IDs, locale formatting, feature flags, and browser-only APIs. Strong answers inspect Server and Client Component boundaries, deployment environment variables, streaming or Suspense behavior, and reproduce with a production build rather than dev mode.

    Red flag: They suppress the hydration warning without finding the mismatch.

  4. 10A component tree re-renders often after adding context for user permissions. How would you reduce unnecessary renders?

    Listen for: Strong answers mention profiling first, splitting context by update frequency, memoizing provider values carefully, using selectors or an external store when appropriate, and keeping large mutable objects out of context. They understand that useMemo is not a complete fix if consumers still subscribe to broad changing values.

    Red flag: They wrap every component in memo and expect the problem to disappear.

  5. 11How would you design form handling for a multi-step onboarding flow with client validation, server validation, drafts, and file uploads?

    Listen for: Look for clear separation between step UI, form schema, persisted draft state, and submission side effects. Candidates may mention React Hook Form, Zod or Valibot, resumable uploads, server error mapping to fields, unsaved-change handling, accessibility of errors, and tests for back/forward navigation.

    Red flag: They treat it as one giant component with one submit handler and no recovery path.

  6. 12You are asked to add authentication-dependent UI to a React app. What security and UX issues do you consider?

    Listen for: Strong candidates distinguish client-side conditional rendering from real authorization on the server. They consider token storage, session refresh, CSRF depending on cookie strategy, loading states while session is unknown, route protection, avoiding sensitive data in bundles or logs, and handling expired sessions without losing user work.

    Red flag: They say hiding a button in React is enough to enforce permissions.

  7. 13How would you approach upgrading an older React 17 app using Create React App to React 19 with Vite and TypeScript?

    Listen for: Listen for an incremental plan: inventory dependencies, add tests around critical flows, update React and React DOM, replace CRA scripts with Vite 7 config, handle environment variable differences, check Strict Mode effects, update testing setup, and migrate JavaScript files gradually with practical TypeScript settings.

    Red flag: They propose a big-bang rewrite before assessing risk and dependencies.

Senior React questions

Judgement, architecture and raising the team's bar.

  1. 14How would you introduce a design system across several React product teams without blocking feature delivery?

    Listen for: Strong answers combine technical and organizational strategy: start with high-value primitives, tokens, documentation, accessibility requirements, versioning, migration paths, and contribution rules. Listen for avoiding a component dumping ground, measuring adoption through code review patterns, and supporting both product flexibility and consistency.

    Red flag: They focus only on publishing a component library package and ignore governance or migration.

  2. 15A React app has both public marketing pages and authenticated workspace pages. How do you decide what renders on the server, client, or at the edge?

    Listen for: Look for trade-offs around SEO, personalization, cacheability, latency, data sensitivity, interactivity, and operational complexity. A strong answer may use Next.js App Router, React Server Components, streaming, and client boundaries selectively while avoiding server rendering for highly dynamic private UI that gains little from it.

    Red flag: They say everything should be server-rendered or everything should be client-rendered.

  3. 16Your team is missing performance targets after shipping a rich dashboard. How would you lead the investigation and remediation?

    Listen for: Senior candidates define signals first: Core Web Vitals, interaction responsiveness, bundle analysis, API timing, long tasks, and React Profiler traces. They prioritize changes such as route splitting, virtualization, server aggregation, caching, Suspense boundaries, and reducing third-party scripts. They also describe ownership, rollout, and regression prevention.

    Red flag: They jump to one optimization technique without establishing where time is spent.

  4. 17How do you design error handling in a React application so failures are recoverable and observable?

    Listen for: Listen for layered handling: component-level validation, route-level error boundaries, Suspense fallbacks, API error normalization, retry policies, offline handling where needed, and correlation IDs in logs. Strong answers include user-friendly recovery actions, not leaking internals, and integrating telemetry without collecting sensitive data.

    Red flag: They rely on a single top-level error boundary and generic toast messages.

  5. 18A shared component package is slowing delivery because changes frequently break consuming apps. What would you change?

    Listen for: Strong answers cover semantic versioning, changelogs, visual regression tests, contract tests, Storybook, codemods for breaking changes, prerelease channels, and clear ownership. They also question whether every component belongs in the shared package and may separate stable primitives from product-specific composites.

    Red flag: They solve it by freezing the package or requiring every consumer to update immediately.

  6. 19How would you raise code quality on a React team without turning reviews into style debates?

    Listen for: Look for explicit standards: TypeScript strictness, ESLint flat config, Prettier, testing guidelines, accessibility checks, component boundaries, and review checklists. Strong seniors automate formatting and simple rules, reserve review energy for design and risk, and coach through examples rather than personal preference.

    Red flag: They rely on senior approval for every decision instead of building shared standards.

  7. 20Describe how you would mentor mid-level React engineers toward owning architecture decisions.

    Listen for: Good answers include pairing on discovery, asking engineers to write small RFCs, exposing trade-offs, reviewing production incidents, and giving scoped ownership before larger decisions. Listen for feedback loops, psychological safety, and accountability. The strongest answers develop judgment rather than just handing out patterns.

    Red flag: They equate mentoring with telling people exactly how to implement features.

System design React questions

Designing real systems end to end.

  1. 21Design a React architecture for a real-time operations dashboard with filters, charts, alerts, and role-based actions.

    Listen for: A strong design separates server state, streaming updates, and local UI state. Listen for WebSocket or SSE reconnection strategy, TanStack Query cache integration, virtualization for large tables, chart rendering costs, permission checks backed by the API, accessibility for alerts, and graceful degradation when real-time updates fail.

    Red flag: They push every event into one global store and re-render the entire dashboard on each update.

  2. 22Design a multi-tenant admin app in React where tenants can customize navigation, branding, permissions, and feature flags.

    Listen for: Look for tenant configuration loading, routing driven by capabilities, clear separation of branding tokens from logic, server-enforced authorization, and safe feature-flag evaluation. Strong answers address caching boundaries, avoiding tenant data leakage, testing representative tenant configs, and keeping bundle splitting compatible with optional modules.

    Red flag: They treat tenant configuration as simple theme data and overlook authorization and isolation.

  3. 23Design a React component platform used by multiple apps with different frameworks, including Vite SPA apps and Next.js apps.

    Listen for: Strong answers discuss package boundaries, ESM builds, peer dependencies for React 19, CSS strategy, tokens, tree shaking, SSR compatibility, accessibility, Storybook documentation, and release channels. They should consider how Server Components affect exported APIs and avoid components that assume browser-only globals at import time.

    Red flag: They design components that only work in one app’s bundler and runtime assumptions.

  4. 24Design a migration path from a legacy client-rendered React app to a hybrid model using Next.js App Router.

    Listen for: Listen for route-by-route migration, preserving user flows, moving suitable data fetching to server components or loaders, defining client boundaries for interactive islands, handling authentication and cookies, validating SEO needs, and monitoring hydration or caching issues. Strong answers keep rollback options and avoid rewriting everything at once.

    Red flag: They propose migrating every route to Server Components before understanding product value or risk.

  5. 25Design a React front end for a collaborative document editor with comments, presence, offline edits, and conflict resolution.

    Listen for: A strong answer recognizes that React is the view layer, not the collaboration engine. Listen for CRDT or operational transform consideration, local persistence, sync status UI, presence throttling, conflict visualization, command-based editing, performance isolation from frequent cursor updates, and tests around reconnect and merge scenarios.

    Red flag: They store the whole document in React state and broadcast it on every keystroke.

Practical task · 2–3 hours

Build a React Issue Triage Board

Create a small React 19 and TypeScript app that helps a support team triage issues. The app should load issues from a provided mock API, support filtering by status and priority, show issue detail in a routed view, allow optimistic status updates with rollback on failure, and keep filters in the URL. Include loading, empty, and error states. You may use Vite 7, React Router 7, TanStack Query 5, and a lightweight styling approach. Keep the scope small enough for two to three hours and add a short README explaining trade-offs.

How to evaluate it

  • Clear separation of server state, URL state, and local UI state
  • Accessible, resilient UI states for loading, errors, empty results, and failed updates
  • Thoughtful routing, query keys, optimistic update, and rollback behavior
  • Readable TypeScript components with maintainable boundaries and minimal over-engineering
  • Practical tests or test plan covering core user flows and failure cases

Rather skip the interview loop?

Every Octogle React engineer has already passed a technical assessment, system design and a live interview with an engineer who has shipped React. Send a brief and get 3–5 scored profiles in 48 hours.