Interview Q&A · questions with model answers

React Developer Interview Questions

Part of the study plan for: Frontend Engineer · Full Stack Engineer

Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.

  1. Most asked What are the most important changes in React 19?

    React 19 introduced Actions (async transitions for mutations) with useActionState, useFormStatus and useOptimistic; the use() API for reading promises and context; ref as a regular prop (no…

  2. Most asked What is concurrent rendering in React?

    Concurrent rendering lets React prepare multiple versions of the UI and interrupt, pause or abandon rendering work, so urgent updates (typing, clicks) aren't blocked by expensive, non-urgent renders…

  3. Most asked What are the pitfalls of fetching data in `useEffect`, and how do you avoid race conditions?

    Effects run after render (waterfalls), don't cache or dedupe, re-run in Strict Mode development, and can set state from stale responses when inputs change quickly (e.g., typing a search). Abort…

  4. What is `useFormStatus` and where must it be used?

    useFormStatus() (from react-dom) returns the pending status, data, method and action of the parent <form>, which lets a reusable submit button show a spinner or disable itself. It must be called in…

  5. What does the `use()` API do?

    use(resource) reads the value of a promise (suspending until it resolves, so the nearest <Suspense> shows a fallback) or a context. Unlike hooks, it can be called conditionally and inside loops.

  6. What is the React Compiler and how does it affect `useMemo`/`useCallback`?

    The React Compiler is a build-time tool (Babel/SWC plugin) that analyzes components and hooks and automatically inserts fine-grained memoization, so most manual useMemo, useCallback and React.memo…

  7. What is the compound components pattern?

    Compound components are a set of components that work together and share implicit state through context, like <Tabs>, <Tabs.List>, <Tabs.Tab> and <Tabs.Panel>, giving consumers flexible composition…

  8. What are stale closures in React hooks and how do you fix them?

    A stale closure happens when a callback or effect captures state/props from an earlier render and later uses outdated values, e.g. an interval set up once that always reads the initial count.

  9. What resource preloading APIs does React DOM provide?

    prefetchDNS, preconnect, preload, preloadModule, preinit and preinitModule from react-dom let components declare resources they'll need (fonts, scripts, styles), and React emits the right hints in…

  10. What is the `<Activity>` component (React 19.2)?

    <Activity mode="visible" | "hidden"> lets you hide parts of the UI while preserving their state and DOM, and React deprioritizes updates in hidden trees and unmounts their effects, which is useful…

  11. What problem does `useEffectEvent` (React 19.2) solve?

    It lets an effect call a function that always sees the latest props/state without listing them as dependencies, separating 'events' (non-reactive logic like logging with the current theme) from the…

  12. What is `useSyncExternalStore` for?

    It subscribes components to external, mutable stores (browser APIs like navigator.onLine, or custom stores) in a way that's safe with concurrent rendering, avoiding tearing where different…

  13. What are the trade-offs between Tailwind, CSS Modules and CSS-in-JS in React?

    Tailwind offers utility classes with no runtime cost and consistent design tokens; CSS Modules provide locally scoped plain CSS; runtime CSS-in-JS (styled-components, Emotion) offers dynamic styling…

  14. What are micro-frontends and what are their trade-offs in React?

    Micro-frontends split a frontend into independently built and deployed apps owned by different teams, composed at runtime (Module Federation, iframes, web components) or build time.

  15. What breaking changes should you check when upgrading to React 19?

    Removed: propTypes runtime checks and defaultProps for function components (use default parameters), string refs, legacy context, ReactDOM.render/hydrate (use createRoot/hydrateRoot),…

  16. What is `useInsertionEffect` for?

    It fires before any layout effects so CSS-in-JS libraries can inject <style> rules before layout is read, avoiding layout thrashing. Application code should almost never use it.

Was this page helpful?

Report a mistake