Interviews test whether you can explain trade-offs, not recite API trivia. Practice short answers for the topics below out loud—30 to 60 seconds each.
Core topics to rehearse
- Declarative UI, reconciliation, and role of keys in lists
- State: local vs lifted vs context vs external store
- Effects: dependencies, cleanup, stale closures
- Controlled vs uncontrolled inputs
- Performance: when to memoize and how to measure
- Error boundaries vs try/catch in handlers
Sample questions
- Q: What happens when you call setState?
A: React schedules a re-render; the component function runs again with new state; React diffs the new element tree against the previous one and patches the DOM. - Q: Why are keys important?
A: They tell React which list item identity persisted so state and focus attach to the correct row when order changes. - Q: useEffect vs useLayoutEffect?
A:useEffectruns after paint (non-blocking);useLayoutEffectruns before paint when you must measure DOM or prevent flicker. - Q: React vs Vue/Angular?
A: React is a view library with ecosystem choices; others ship more opinions (routing, reactivity model). Match answer to team context, not fan wars.
Whiteboard habit
Draw a parent with two children sharing state—show where state lives, which props flow down, which events bubble up. Interviewers reward clear diagrams over buzzwords.
Self-check
- Can you explain reconciliation without saying “Virtual DOM” alone?
- Can you describe a bug you fixed involving effects or keys?
Interview: Practice drawing props-down / events-up on paper for a filter + list + detail screen—it appears in most onsite loops.
Interview prep
- Must-know React interview topics?
Reconciliation, keys, controlled inputs, effect dependencies, stale closures. Explain trade-offs: context vs props, useReducer vs useState, when to lift state.