I. REACT FUNDAMENTALS & ADVANCED PATTERNS (15 Questions)
Explain the React Fiber architecture and how it differs from the previous stack reconciler. How does this affect performance optimization strategies?
Follow-up: Describe how time slicing and suspense work under Fiber architecture.
Implement a custom hook
useDeepCompareEffectthat only triggers when deep equality changes. Compare its performance implications vsuseEffectwith dependency arrays.Follow-up: When would you use
useMemovsuseCallbackvs custom memoization?
Design a render-prop based component that handles authentication state. Then refactor it to use hooks. Discuss the trade-offs between both patterns.
Follow-up: How do render props affect React DevTools debugging experience?
Explain the subtle differences between
useLayoutEffectanduseEffectwith concrete examples where each is appropriate.Follow-up: How do these hooks behave during server-side rendering?
Implement error boundaries with recovery mechanisms. How would you design a system to track and report these errors at scale?
Follow-up: Why don't error boundaries catch errors in event handlers?
Create a higher-order component that injects internationalization. Then implement the same using Context + hooks. Compare bundle size implications.
Follow-up: How would you implement code splitting with HOCs vs hooks?
Explain React's synthetic event system and its performance implications for large applications.
Follow-up: When would you use native events instead?
Design a portal-based modal system that manages focus trapping, ARIA attributes, and stacking context.
Follow-up: How would you handle multiple concurrent modals?
Implement a virtualized list component from scratch. Discuss optimization techniques for variable height items.
Follow-up: How would you handle dynamic content loading within the viewport?
Explain Concurrent Features in React 18+:
startTransition,useDeferredValue, and Suspense for Data Fetching.Follow-up: How do these features impact UX metrics like INP (Interaction to Next Paint)?
Design a compound component pattern for a data table with sortable, filterable columns and selectable rows.
Follow-up: How would you make it accessible for screen readers?
Implement a custom
useReducerwith middleware support similar to Redux.Follow-up: How would you handle side effects in this system?
Explain the "lifting state up" pattern and when you might choose React Context instead.
Follow-up: How does this decision impact component re-renders?
Create a drag-and-drop system using the HTML5 Drag API with React.
Follow-up: How would you make this work on touch devices?
Implement a real-time collaborative text editor using Operational Transformation or CRDTs with React.
Follow-up: How would you handle offline synchronization?
II. STATE MANAGEMENT & DATA FLOW (10 Questions)
Compare Redux Toolkit, Zustand, Jotai, and Recoil for a large enterprise application. What criteria would you use to choose?
Follow-up: How do these affect bundle size and initial load time?
Design a normalized state structure for an e-commerce application with products, categories, users, and orders.
Follow-up: How would you handle real-time inventory updates?
Implement optimistic updates for a shopping cart with rollback on error.
Follow-up: How would you persist the optimistic state during page reloads?
Design a state synchronization system between multiple browser tabs using BroadcastChannel or localStorage events.
Follow-up: How would you handle merge conflicts?
Explain the trade-offs between client-side state, server state, and URL state.
Follow-up: When would you use React Router's state vs Redux?
Implement a finite state machine for a multi-step checkout process using XState.
Follow-up: How would you visualize and debug state transitions?
Design a caching strategy for GraphQL queries with normalized caching.
Follow-up: How would you handle cache invalidation for nested mutations?
Create a real-time dashboard with WebSocket connections managing multiple data streams.
Follow-up: How would you handle connection drops and reconnection strategies?
Implement a middleware for Redux that handles API requests with retry logic and exponential backoff.
Follow-up: How would you add request deduplication?
Design a form management system that handles complex validation, cross-field dependencies, and async validation.
Follow-up: How would you implement draft auto-save functionality?
III. PERFORMANCE OPTIMIZATION (10 Questions)
Analyze a React application's performance using Chrome DevTools and React Profiler. What metrics would you prioritize?
Follow-up: How would you identify "wasted renders"?
Implement code splitting for a large application using dynamic imports, React.lazy, and Suspense.
Follow-up: How would you preload critical chunks?
Design a performance monitoring system that tracks Core Web Vitals in production.
Follow-up: How would you attribute performance issues to specific components?
Optimize a large list rendering 10,000 items with virtualization, memoization, and web workers for sorting/filtering.
Follow-up: How would you handle memory management for infinite scrolling?
Explain the impact of Context API on performance and strategies to mitigate unnecessary re-renders.
Follow-up: When would you split contexts vs use selectors?
Implement a custom
useMemowith a size-limited LRU cache.Follow-up: How would you determine the optimal cache size?
Design a bundle analysis pipeline that identifies optimization opportunities.
Follow-up: How would you enforce bundle size limits in CI/CD?
Optimize a React application for mobile devices with limited CPU and memory.
Follow-up: How would you implement adaptive rendering based on device capabilities?
Explain tree shaking in modern bundlers and how to ensure it works effectively with React.
Follow-up: How do barrel exports affect tree shaking?
Implement a performance budget system with regression detection.
Follow-up: How would you prioritize performance fixes?
IV. TESTING & QUALITY (5 Questions)
Design a testing strategy covering unit, integration, and E2E tests for a React application. What would be your test pyramid distribution?
Follow-up: How would you mock complex dependencies like WebSockets?
Implement a custom render function for Testing Library that includes providers (Redux, Router, Theme).
Follow-up: How would you test custom hooks in isolation?
Create a visual regression testing pipeline for a component library.
Follow-up: How would you handle dynamic content in snapshots?
Design an accessibility testing strategy that integrates into CI/CD.
Follow-up: How would you ensure ongoing compliance, not just initial testing?
Implement contract testing for a micro-frontend architecture.
Follow-up: How would you handle breaking changes?
V. ARCHITECTURE & SCALABILITY (10 Questions)
Design a micro-frontend architecture for a large enterprise application. Compare Module Federation vs single-spa vs iframes.
Follow-up: How would you handle shared dependencies and versioning?
Create a design system architecture with theming, dark mode, and CSS-in-JS vs CSS Modules vs utility-first CSS.
Follow-up: How would you ensure consistency across teams?
Design a server-side rendering setup with streaming, hydration optimization, and partial hydration.
Follow-up: How would you handle third-party scripts that break SSR?
Implement a plugin architecture allowing teams to extend a core application.
Follow-up: How would you ensure plugin isolation and security?
Design a build system supporting multiple deployment targets (web, mobile web, PWA, desktop with Electron).
Follow-up: How would you share code while maintaining platform-specific optimizations?
Create an A/B testing framework that supports multivariate testing and gradual rollouts.
Follow-up: How would you ensure type safety for experiment configurations?
Design a feature flag system with runtime configuration and gradual rollouts.
Follow-up: How would you clean up old feature flags?
Implement a monorepo structure with efficient CI/CD pipelines.
Follow-up: How would you handle shared dependency updates?
Design an offline-first PWA with background sync and IndexedDB for data persistence.
Follow-up: How would you handle schema migrations?
Create a migration plan from class components to functional components with hooks.
Follow-up: How would you ensure zero downtime during migration?
VI. LEADERSHIP & SYSTEM DESIGN (5 Questions)
How would you structure a frontend team of 10 engineers working on a large React application? What processes would you implement?
Follow-up: How would you mentor mid-level engineers to senior level?
Design an RFC (Request for Comments) process for technical decisions in a React codebase.
Follow-up: How would you handle disagreements about technical direction?
Create a technical debt assessment framework and prioritization matrix for a legacy React application.
Follow-up: How would you secure resources for addressing technical debt?
Design a frontend incident response process for production issues.
Follow-up: How would you implement feature toggles for rapid rollback?
How would you evaluate and adopt new React features or third-party libraries in an enterprise environment?
Follow-up: What criteria would you use for build vs buy decisions?
Interview Evaluation Framework
When conducting interviews with these questions, assess candidates on:
Depth of Technical Knowledge - Understanding of React internals
Practical Problem Solving - Ability to translate theory to code
System Design Thinking - Considering scalability, maintenance, and team workflows
Performance Awareness - Optimization mindset and metrics-driven approach
Leadership & Communication - Ability to explain complex concepts and make trade-offs explicit