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. How do you choose between Context, Zustand, Redux Toolkit and server-state libraries?

    Use local state first, Context for low-frequency global values (theme, auth user), a server-state library (TanStack Query, SWR, RTK Query) for data fetched from APIs (caching, refetching,…

  2. What makes a well-designed custom hook?

    It encapsulates one concern, follows the Rules of Hooks, starts with use, returns a stable and minimal API (values and memoized callbacks), handles cleanup, and doesn't hide surprising side effects.…

  3. How do you build robust forms in React?

    For complex forms use React Hook Form (uncontrolled inputs, minimal re-renders) with schema validation (Zod via resolvers); for simple forms use native form actions or controlled inputs. Always…

  4. How can you use the `key` prop to reset a component's state?

    Changing a component's key tells React it's a different component instance, so it unmounts the old one and mounts a fresh one with initial state, e.g. <ProfileForm key={userId} /> resets the form…

  5. How do you build an accessible modal dialog in React?

    Render it via a portal (or the native <dialog> element), trap focus inside while open, return focus to the trigger on close, close on Escape, mark the background inert, and use role="dialog",…

  6. How do you render very large lists efficiently?

    Virtualize (window) them with libraries like TanStack Virtual or react-window, so only visible rows are rendered; give stable keys; memoize row components when needed; and paginate or use infinite…

  7. How do you find performance problems in a React app?

    Use React DevTools Profiler to see which components render, why ('why did this render') and how long they take; Chrome Performance panel for main-thread work and long tasks; and Web Vitals (INP…

  8. How do you code-split a React app?

    Split by route or heavy feature using React.lazy(() => import('./Page')) with <Suspense fallback>, or framework-level route splitting, and preload likely-next chunks on hover/intent.

  9. How do you build and maintain a React design system?

    Build accessible primitives (often on headless libraries like Radix or React Aria), define design tokens, document components in Storybook with interaction and visual tests, publish a versioned…

  10. How do you internationalize a React app?

    Use a library such as react-i18next or FormatJS (react-intl) with message catalogs and ICU message syntax for plurals and interpolation, format dates/numbers with Intl, load translations lazily per…

  11. How do you add performant animations in React?

    Animate transform and opacity (GPU-friendly) with CSS transitions or libraries like Motion (Framer Motion) for layout and exit animations, and use the View Transitions API (with React's experimental…

Was this page helpful?

Report a mistake