Blog1 min readPremium

React Interview Questions: What Interviewers Are Actually Listening For

React Interview Questions: What Interviewers Are Actually Listening For

React questions come up in almost every frontend loop, either as a dedicated round or mixed into a UI build. I’ve noticed that most candidates can define things like the virtual DOM or useEffect. Far fewer can explain why React behaves the way it does.

That “why” is what interviewers are listening for. Here are the questions I see most, and what a strong answer sounds like.

What happens after setState: trigger, render, commit, effects

Almost every React question maps to one of these four steps: what triggers a render, what happens during render, what gets committed to the DOM, and when effects run. If you can place a question on this diagram, you can usually reason your way to the answer.

1. “What causes a component to re-render?”

Three things:

  • Its own state changes.
  • Its parent re-renders (by default, children re-render with the parent, even if their props didn’t change).
  • A context it consumes changes.

The common mistake is saying “when its props change”. Props changing isn’t a trigger by itself. The parent re-rendering is. That’s why React.memo exists: it lets... premium content.

Premium

Keep reading with Premium

Get the rest of this guide plus every premium question, solution, and system design deep dive.

  • All premium solutions
  • System design deep dives
  • Company-specific prep

4.9/5 from our users