You just landed that call for a Staff Frontend Engineer role at a company you actually respect. Awesome. But here’s the kicker: they use React. A lot. And you haven't touched a useEffect hook in a hot minute, or maybe you've been stuck in a legacy Angular project for years. The panic sets in. That's fine. We've all been there. This isn't about memorizing trivia; it's about understanding how React works, why it works that way, and how to articulate those ideas under pressure. I've sat through enough of these React interview prep cycles, both as the candidate sweating bullets and the engineer asking the hard questions, to know what actually matters.
Why 30 Questions? It's About Depth, Not Just Coverage
Look, you don't need a thousand questions. Nobody has time for that. What you need is a focused set that forces you to think deeply about React's core principles, common pitfalls, and architectural decisions. These aren't just "What is a component?" type questions. They're designed to provoke discussion, reveal your problem-solving process, and show whether you truly get React, or just know how to copy-paste from Stack Overflow. I've broken them down into logical sections. Don't just answer them; explain the why behind your answer. That's where you shine.
Fundamentals: Building Blocks and Mental Models
This is where you show you understand the basic machinery. If you stumble here, the rest of the interview won't go well.
- Explain the core difference between class components and functional components with hooks. Don't just say "class components use
this." Talk about state management, lifecycle methods, and reusability. - What's the Virtual DOM, and why does React use it? How does it differ from the actual DOM? Detail the reconciliation process.
- Describe the React component lifecycle for a functional component. How do
useEffectanduseLayoutEffectmap to traditional lifecycle methods likecomponentDidMountorcomponentDidUpdate? - When does a React component re-render? List at least three specific scenarios.
- What is a "key" in React lists, and why is it important? What happens if you don't use them, or use
indexas a key? - Explain "lifting state up" in React. When is it a good pattern, and what are its potential drawbacks?
- What are React Portals, and when would you use them? Give a concrete example.
Hooks: The Modern React Paradigm
Hooks changed everything. If you're not comfortable with them, you're not comfortable with modern React.
- Deep dive into
useEffect. Explain its dependency array, common use cases (data fetching, subscriptions), and how to clean up side effects. What if you omit the dependency array? What about an empty array? - When would you use
useRef? Provide specific scenarios where it's more appropriate than state. - Explain
useMemoanduseCallback. What problems do they solve? What are the trade-offs of using them too aggressively? - How does
useContextwork, and when is it a good alternative to prop drilling? When might you still prefer prop drilling? - Describe
useReducer. When is it a better choice thanuseStatefor managing component state? - What is a custom hook? How do you create one, and what benefits do they offer? Give an example.
- Can you put a
useStatecall inside anifstatement? Why or why not? This tests your understanding of the Rules of Hooks.
Performance & Optimization: Making React Fast
It's not enough to build a feature; it needs to run well. Show them you care about user experience.
- How would you optimize a React application for performance? List at least five specific techniques. Think about bundling, memoization, virtualization, etc.
- Explain
React.memo. When should you use it, and what are its limitations? - What is code splitting, and how do you implement it in React? What are the benefits?
- Discuss strategies for handling large lists in React. Why can rendering thousands of items directly cause performance issues, and what solutions exist?
- How do you prevent unnecessary re-renders in a complex component tree? Focus on specific patterns beyond
React.memo.
Advanced Concepts & Architecture: Thinking Beyond Components
Senior engineers don't just write components; they design systems.
- Explain Server-Side Rendering (SSR) versus Client-Side Rendering (CSR) in React. What are the pros and cons of each? When might you choose one over the other?
- What is
SuspenseandReact.lazy? How do they help with user experience and initial load times? - Describe error boundaries in React. How do you implement them, and what kind of errors do they catch?
- How do you manage global state in a large React application without
useContext? Discuss popular libraries and their approaches. - Explain the concept of Higher-Order Components (HOCs). When might you still use an HOC instead of a custom hook?
- What are Render Props? How do they compare to HOCs and custom hooks for code reuse?
- Describe the purpose of
Strict Modein React. What warnings does it provide?
Testing & Best Practices: Building Robust Apps
A good engineer writes code that works and can be maintained.
- How do you typically test React components? Name specific tools and types of tests (unit, integration, end-to-end).
- What is the difference between shallow rendering and full DOM rendering in testing? When would you use each?
- Discuss accessibility (a11y) considerations in React development. What are some common pitfalls and best practices?
- Beyond performance, what are some key considerations for building a scalable and maintainable React application? Think about folder structure, component organization, and documentation.
This Isn't a Checklist, It's a Springboard
Honestly, no single interview will hit all 30 of these. Some will go deep on hooks, others on performance, and a few might even throw in a system design question around a React architecture. The point of this list isn't to memorize answers like you're cramming for a history exam. It's to give you a framework for thinking critically about React.
Pick 5-10 questions you feel weakest on, then spend an hour researching, writing out your thoughts, and even coding small examples. Then, try to explain them out loud to yourself or a rubber duck. Can you articulate the "why" clearly? Can you discuss trade-offs? That's the real test. If you can do that, you're not just ready for the interview; you're ready to be an impactful senior engineer who actually understands their tools.
Ready to Ace Your Next Interview?
Practice with AI-powered mock interviews tailored to your target role and company. Start Practicing for Free | Explore Interview Prep
