What causes a React component to re-render, and how would you prevent unnecessary re-renders?
MiddleVery commonreactrerendering
What is the cleanup function returned from useEffect for, and when does React call it?
JuniorVery commonreactuseeffect
What is the difference between props and state in a React component?
JuniorVery commonreactprops
What do the three forms of the useEffect dependency argument mean: no array, an empty array, and an array with values?
JuniorVery commonreactuseeffect
What is tearing in concurrent React, and why do external stores need useSyncExternalStore?
SeniorSometimesreactconcurrent-rendering
What do React error boundaries catch, and which errors do they not catch?
MiddleCommonreacterror-boundaries
You lead the migration of a large codebase from class components and legacy patterns to modern React with hooks and Strict Mode. How do you plan it?
SeniorSometimesreactmigration
Design an optimistic "like" button using React 19's actions and useOptimistic. How do you handle failure and keep the UI honest?
SeniorCommonreactserver-actions
Several teams want to ship parts of one React application independently using micro-frontends. What are the main trade-offs, and when would you advise against it?
SeniorSometimesreactarchitecture
How does a parent get a ref to a DOM node inside a child component in React 19, and when would you use useImperativeHandle?
MiddleSometimesreactrefs
A setInterval inside useEffect with an empty dependency array always logs the initial count. Explain the stale closure and two ways to fix it.
MiddleVery commonreactclosures
Your React app opens a modal dialog. What must you handle for keyboard and screen-reader users?
MiddleCommonreactaccessibility
Why must React component names start with a capital letter, and why shouldn't you define a component inside another component?
JuniorVery commonreactcomponents
A component renders {items.length && <List items={items} />} and sometimes shows a stray 0 on the page. Why, and how do you fix it?
JuniorCommonreactconditional-rendering
Two sibling components need to show and change the same value. How do you share it?
JuniorVery commonreactstate
A profile editor keeps the previous user's unsaved text when you switch to another user. How can the key prop fix this, and why does it work?
MiddleCommonreactreconciliation
What principles does React Testing Library encourage, and how would you test a form that shows an error after a failed submit?
MiddleVery commonreacttesting
How do React.lazy and Suspense help with code splitting, and where would you place the Suspense boundary?
MiddleCommonreactsuspense
When is React Context a good fit, and what performance problem appears if the provider's value is a new object on every render?
MiddleVery commonreactcontext
How does streaming server rendering with Suspense work, and how do you decide where to place Suspense boundaries on a page?