In 1 minute
- Explain inputs, state and events before choosing an API.
- Distinguish rendering from DOM changes and consider component identity.
- Use effects for external synchronization; handlers process actions and rendering calculates derived values.
React interview questions require more than remembering hook names. You need to explain what changes after an event, why a render happens and which data remains valid. A useful answer follows a small component, states what the user expects and separates rendering calculations, state updates and external synchronization.
This guide focuses on concepts and short examples. For planning a practical implementation, use the React coding challenge guide. If a question involves variable capture or promises, revisit the JavaScript questions. Those fundamentals still apply inside components and help avoid attributing every behavior to the framework.
Answering React interview questions
Identify inputs
Start with component inputs, owned state and the event under discussion.
Predict the interface
Describe the expected next interface before naming an API.
Distinguish render and DOM
When discussing extra renders, distinguish calling the component function from changing the DOM. React can calculate new output without modifying every element. This distinction prevents treating every render as a performance defect.
- Identify who owns each value and who updates it.
- Describe behavior during a concrete interaction.
- Explain which work occurs during rendering.
- Include a limitation or a case that would change the solution.
Do not present memoization as an automatic answer. First identify expensive work or an identity dependency with observable consequences. An optimization that adds complexity needs a reason, and component correctness must not depend on it.

Props, state and derived values
Props are received inputs; state is component memory across renders. An ordinary local variable is recreated on each execution, and changing it does not request another render. Ask which values truly need to be remembered. If you have an expense list and need a total, calculate it from the list instead of maintaining two synchronized sources.
type Expense = { id: string; cents: number };type Props = { expenses: readonly Expense[] };export function ExpenseTotal({ expenses }: Props) {const cents = expenses.reduce((total, expense) => total + expense.cents, 0);return <output>{(cents / 100).toFixed(2)}</output>;}
The example uses simple formatting for the exercise; currency and locale would require another decision. No effect is needed because no external system needs synchronization. For updates based on previous state, explain functional setters. Reading state immediately after requesting an update still observes the current render's value rather than a changed local variable.
Rendering, identity and keys
React associates state with component position and type in the tree, taking keys into account when present. In reorderable lists, stable keys preserve the association between items and components. Index keys can attach local state to the wrong item after insertion. Generating random keys on every render destroys continuity rather than improving it.
An intentional key change can reset an editor when switching the edited entity. Explain that as an identity decision, not a trick to refresh the screen. Keys must be unique among siblings, not throughout the application. If a component needs the identifier as data, pass a separate prop because key is not received as an ordinary prop.
Effects, dependencies and cleanup
Do
- Use effects to synchronize with something outside rendering, such as an event subscription.
- Work directly caused by a click usually belongs in its handler. Deriving text from two props belongs in output calculation.
Avoid
- Creating an effect for every variable change: it adds unnecessary steps and can conceal duplicated state.
Dependencies should reflect the reactive values used by the effect. Omitting one to suppress reruns can leave the effect using stale data. Cleanup reverses the previous synchronization before another setup and on unmount. In development with Strict Mode, an extra setup-and-cleanup cycle helps expose asymmetry; duplicate subscriptions still require investigation.
Composition, context and responsibility boundaries
Before adding a boolean prop for every variation, consider whether a content slot or composition expresses the difference better. A notice component can receive a title and content without knowing the business rule that caused it to appear. That keeps presentation reusable while decisions stay near the data that justifies them.
Context distributes a value through the tree; it does not automatically replace all state management. When the supplied value changes, its consumers may need to render again. Separate responsibilities before trying to stabilize everything through memoization. Use the TypeScript questions to model valid prop combinations and front-end tests to verify public behavior.
Transitions and Actions in React 19
A transition marks state updates as non-blocking work. It does not move JavaScript to another thread or make an expensive function free. State controlling a text input must track typing immediately; another update, such as a costly display area, can have a different priority. Explain which interaction must remain responsive.
In React 19, Actions can include asynchronous work within a transition. useTransition provides pending state, while useActionState connects an Action with state and a result. Actions are not all Server Functions: execution location depends on the function and integration. When using startTransition directly, updates after await need another startTransition call to be marked as transitions. Also discuss errors and response ordering; rendering priority does not guarantee network completion order.
Frequently asked questions
What React topics should I study for interviews?
Study props, state, rendering, identity, effects and composition. Then explore transitions and Actions as relevant to the role. Explain an interaction and a possible failure for each topic.
How does state differ from a regular variable?
State persists across renders, and its setter requests an update. A regular local variable does not provide those properties. A ref may suit values that do not drive rendering.
When should I use or avoid useEffect?
Use it for external synchronization with appropriate dependencies and cleanup. Avoid it for deriving available render data or performing work that belongs directly in an event handler.
What should I study about React 19 transitions and Actions?
Understand urgent updates, pending state, asynchronous work and errors. Distinguish Actions from Server Functions and explain what happens when two operations finish in a different order.
Practice with real tests
Solve front-end exercises in the browser, with the same tests a reviewer would run.
See the exercises