React Developer Interview Questions (2026) and How to Answer
By FindAJobAI Team Updated How we wrote this page
React developer interviews usually combine questions on hooks, state and rendering with a live coding task in React, a discussion of how you would structure a feature, and questions on testing, accessibility and performance. Senior rounds may add server rendering and design system topics.
Interviewers watch for components that are easy to read, state kept in the right place, and an eye for what users actually experience.
Below: 30 questions with what each one really asks and an answer outline, full sample answers to the 10 most asked, red flags to avoid and a 7-day plan.
Answering with STAR
Tell each story in four steps: the situation in a sentence, your task, the actions you took (most of the answer) and the result, with a number if you have one. Aim for about two minutes; the outlines show what to include, the details must be yours.
Behavioural questions (1–10)
How you've handled real situations. Answer each with one true story, in STAR order.
1.Tell me about a time you made a slow React page noticeably faster.
What they're really asking: Can you measure a front-end performance problem before fixing it?
Answer outline (STAR)
- SituationA search results page that took over four seconds to show content on mid-range phones.
- TaskBring load time down without a full rewrite.
- ActionProfiled the page, moved rendering to the server, lazy-loaded the filter panel and cached API results.
- ResultLargest Contentful Paint fell below two seconds and became a budget checked in CI.
Full sample answer (fictional example)
Our hotel search page took over four seconds to show results on a mid-range Android phone, and most of our visitors came from phones. Before changing anything, I recorded the page in Chrome's performance panel and checked our real-user data. Most of the time went into downloading and running JavaScript before any rendering started. I moved the results to server rendering in Next.js, lazy-loaded the filter panel, and cached API responses so going back did not refetch. Largest Contentful Paint dropped below two seconds, and I added a budget to CI so a later change could not quietly undo it.
2.Describe a time you disagreed with a designer about an interface.
What they're really asking: Can you raise technical or accessibility concerns constructively?
Answer outline (STAR)
- SituationA custom dropdown design that could not be used with a keyboard or screen reader.
- TaskKeep the visual intent while making it accessible.
- ActionBuilt a quick prototype on a native-like listbox pattern and walked the designer through it with a screen reader running.
- ResultThe designer adjusted the spec, and the pattern became the standard dropdown in the library.
Full sample answer (fictional example)
A designer handed over a custom dropdown that looked great but could not be reached with a keyboard or read properly by a screen reader. Rather than argue in comments, I built a quick prototype using the listbox pattern from the ARIA guidelines, styled to match her design. Then I sat with her and showed both versions with a screen reader running. Hearing the difference made the case better than I could. She adjusted a few details in the spec, we shipped the accessible version, and it became the standard dropdown in our component library.
3.Tell me about a bug that only appeared in production.
What they're really asking: Do you debug front-end issues methodically when you cannot reproduce them locally?
Answer outline (STAR)
- SituationUsers on one browser saw a blank checkout after a release, but no test failed.
- TaskFind the cause quickly and stop the losses.
- ActionUsed error monitoring to find the stack trace, traced it to an unsupported API in a dependency, and rolled back behind a flag.
- ResultCheckout recovered within the hour, and the team added that browser to the CI test matrix.
4.Tell me about a time you cleaned up a messy React codebase.
What they're really asking: Can you improve code safely while features keep shipping?
Answer outline (STAR)
- SituationA dashboard with a huge global store where every change caused unrelated screens to re-render.
- TaskMake the code easier to change without a feature freeze.
- ActionMoved server data into a query cache screen by screen, leaving the store only for true interface state.
- ResultThe store shrank by most of its size, and new dashboard features shipped faster the next quarter.
Full sample answer (fictional example)
I joined a team whose dashboard kept all data in one large Redux store, including API responses. Any update re-rendered screens that had nothing to do with it, and adding a feature meant touching reducers in several places. I did not want a feature freeze, so I moved one screen at a time to TanStack Query for server data, leaving the store only for true interface state. Each move was its own small pull request with tests. After a few months the store had shrunk by most of its size, and the team shipped dashboard features faster the next quarter.
5.Describe a time you helped a teammate grow as a React developer.
What they're really asking: Do you share knowledge and review code kindly?
Answer outline (STAR)
- SituationA new developer whose pull requests kept introducing effects with missing dependencies.
- TaskHelp them understand the cause rather than just fix each case.
- ActionPaired on two features, explained how effects synchronize with outside systems, and wrote a short team note with examples.
- ResultTheir reviews needed far fewer rounds within a month, and the note became part of onboarding.
6.Tell me about a time you shipped a React feature under a tight deadline.
What they're really asking: Can you cut scope openly rather than skip quality?
Answer outline (STAR)
- SituationA partner launch that needed a new onboarding flow in three weeks.
- TaskDeliver a usable, tested first version on time.
- ActionAgreed the essential steps with the product manager, built them with tests, and deferred animations and edge screens.
- ResultThe flow launched on schedule and the deferred pieces shipped two sprints later.
7.Describe a time you migrated a React codebase to TypeScript.
What they're really asking: Can you lead a gradual migration without stopping feature work?
Answer outline (STAR)
- SituationA large JavaScript app where prop mistakes caused regular production errors.
- TaskAdd types without freezing feature delivery.
- ActionEnabled TypeScript alongside JavaScript, converted shared components first, and set a rule that touched files get typed.
- ResultMost of the app was typed within the year, and prop-related errors in monitoring fell sharply.
8.Tell me about a time you used data to change an interface.
What they're really asking: Do you connect your work to user outcomes?
Answer outline (STAR)
- SituationA checkout where analytics showed many users leaving on the address step.
- TaskLearn why shoppers quit there and repair the step.
- ActionWatched session recordings, found the address form failed on autofill, and rebuilt it with proper input attributes.
- ResultDrop-off on that step fell noticeably in the following A/B test.
Full sample answer (fictional example)
Analytics showed that a large share of shoppers left checkout on the address step. I watched a set of anonymized session recordings and noticed that browser autofill often put values in the wrong fields, because our inputs had no proper autocomplete attributes and one field was split in an unusual way. I rebuilt the form with standard input names and autocomplete values and simplified the layout. We ran it as an A/B test for two weeks, and drop-off on that step fell noticeably in the new version.
9.Tell me about a time you turned down a request to add a heavy library.
What they're really asking: Can you push back with reasons and offer an alternative?
Answer outline (STAR)
- SituationA request to add a heavy charting library for one small chart.
- TaskProtect page speed while still meeting the need.
- ActionMeasured the bundle cost, then built the chart with a few lines of SVG and offered to revisit if more charts were planned.
- ResultThe page stayed within its performance budget, and the stakeholder was happy with the result.
10.Describe a time a test suite gave you false confidence.
What they're really asking: Do you close the testing gaps that let a regression through?
Answer outline (STAR)
- SituationComponent tests passed, but a release broke because the real API returned a field in a different shape.
- TaskStop API shape changes from breaking the interface again.
- ActionAdded contract checks on API responses and a few end-to-end tests against a staging server.
- ResultThose tests caught two similar mismatches before release that quarter.
Technical and role-skill questions (11–22)
Can you do the work itself? Think out loud and name the trade-offs.
11.What happens when a React component re-renders, and what triggers it?
What they're really asking: Core understanding of React's rendering model.
Answer outline
- A component re-renders when its state changes, its parent re-renders, or a context it reads changes.
- React then compares the new output with the previous one and updates only the parts of the DOM that differ.
Full sample answer (fictional example)
A component re-renders when its own state changes, when its parent re-renders, or when a context value it reads changes. Re-rendering means React calls the component function again to get new output. It then compares that output with the previous result and updates only the DOM nodes that actually changed. So a re-render is not automatically expensive. It becomes a problem when a component does heavy work on each render or when a change high in the tree re-renders many children that did not need it, which is when I reach for the Profiler.
12.When should you use useEffect, and when should you avoid it?
What they're really asking: Misused effects are one of the most common React problems.
Answer outline
- Use it to synchronize with something outside React, such as a subscription, a timer or a manual DOM API.
- Avoid it for values you can compute during render or for handling user events, which belong in event handlers.
Full sample answer (fictional example)
I use useEffect to keep a component in sync with something outside React, such as a WebSocket subscription, a timer, or a third-party widget that needs a DOM node. I avoid it for anything I can calculate during render, like filtering a list from props, because an effect there just causes an extra render and can go stale. I also avoid it for responding to user actions, which belong in event handlers. When I do write an effect, I list every dependency honestly and return a cleanup function so subscriptions do not leak.
13.How do useMemo, useCallback and React.memo differ?
What they're really asking: Do you know the memoization tools and their costs?
Answer outline
- useMemo caches a computed value, useCallback caches a function, and React.memo skips re-rendering a component when its props are unchanged.
- They help only when profiling shows a real cost, because they add complexity and comparison work.
14.Why do list items need keys, and what goes wrong with index keys?
What they're really asking: A classic source of subtle state bugs.
Answer outline
- Keys let React match items between renders so it can keep their state and DOM nodes.
- Index keys break when items are inserted, removed or reordered, which can attach state to the wrong row.
Full sample answer (fictional example)
Keys tell React which item is which between renders, so it can keep each item's state and DOM node attached to the right data. If I use the array index and someone deletes the first item, every following item shifts down one index. React then thinks the items are the same and reuses state in the wrong place, so a half-typed comment can jump to a different row. I use a stable ID from the data. Index keys are fine only for static lists that never reorder or change.
15.How would you decide where a piece of state should live?
What they're really asking: Judgment about state design rather than tool names.
Answer outline
- Keep state as close as possible to the components that use it, and lift it only when siblings need to share it.
- Treat server data separately, with a caching library, and use context or a store only for truly global interface state.
Full sample answer (fictional example)
I start by asking what kind of state it is. Server data, like a list of orders, goes into a caching library such as TanStack Query, because it handles loading, refetching and sharing between screens. Interface state, like whether a panel is open, stays in the component that uses it. I only lift state up when two siblings need it, and I only use context or a global store for things that really are app-wide, such as the signed-in user or the theme. Keeping state close to where it is used makes components easier to read and avoids needless re-renders.
16.What is the difference between controlled and uncontrolled form inputs?
What they're really asking: Forms are a large part of most React work.
Answer outline
- A controlled input takes its value from React state and reports every change, which makes validation and formatting easy.
- An uncontrolled input keeps its value in the DOM and is read through a ref, which can be lighter for large forms.
17.What does server rendering give you, and what does hydration mean?
What they're really asking: Awareness of how modern React apps are delivered.
Answer outline
- Server rendering sends ready HTML so users see content sooner and search engines can read it.
- Hydration then attaches React's event handlers to that HTML in the browser, and mismatches between server and client output cause warnings or bugs.
18.How does React context work, and when can it cause performance problems?
What they're really asking: Do you understand the costs of context?
Answer outline
- Context passes a value down the tree without props, and every component reading it re-renders when the value changes.
- Split contexts by concern and keep frequently changing values out of broad providers.
19.What are custom hooks, and when would you write one?
What they're really asking: Can you share logic cleanly between components?
Answer outline
- A custom hook is a function that uses other hooks to package reusable stateful logic.
- Write one when several components repeat the same effect, subscription or data-loading pattern.
20.How do you handle loading and error states for data fetching?
What they're really asking: Do you think about what users see while waiting or when things fail?
Answer outline
- Model loading, error, empty and success as explicit states, often through a library like TanStack Query.
- Show skeletons or messages for each state and give users a way to retry.
21.How would you test a React component that fetches data?
What they're really asking: Do you test components the way users actually use them?
Answer outline
- Render it with React Testing Library and mock the network layer with a tool such as Mock Service Worker.
- Assert on what the user sees, such as text and roles, rather than on internal state.
22.What tools do you use to find why a component re-renders too often?
What they're really asking: Can you track down needless re-renders with the right tools?
Answer outline
- Use the React DevTools Profiler to see which components render and why.
- Then check for new object or function props on each render, broad context values or state kept too high.
Take-home or live exercise: tips
React interviews often include live coding in a sandbox, such as building a searchable list or a small form with validation, and sometimes a take-home feature with tests.
- Handle loading, error and empty states, not just the happy path.
- Explain where each piece of state lives and why as you write it.
- In a take-home, add a few React Testing Library tests and a short README on trade-offs.
Situational questions (23–30)
Scenarios that test judgement: say what you'd do first, and why.
23.A product manager says a page feels slow, but you have no numbers. What do you do first?
What they're really asking: Do you measure before you optimize?
Answer outline
- Record the page with browser performance tools and real-user metrics such as Largest Contentful Paint and Interaction to Next Paint.
- Find the biggest cost first, whether network, JavaScript size or rendering, before changing code.
Full sample answer (fictional example)
I would get numbers before touching code. First I would check real-user metrics, if we collect them, for Largest Contentful Paint and Interaction to Next Paint on that page. Then I would record the page in the browser performance panel on a throttled connection to see where time goes: network, JavaScript parsing or rendering. That usually points to one large cost, like a heavy library or a slow API call. I would share the findings with the product manager, agree what good looks like, and fix the biggest problem first.
24.A teammate wants to put all application state into one global store. How do you respond?
What they're really asking: Can you argue for simpler state design?
Answer outline
- Ask which data is server data and which is interface state, since they have different needs.
- Suggest a query cache for server data and local state by default, with a store only for what many screens truly share.
Full sample answer (fictional example)
I would start by agreeing on the goal, which is usually making data easy to share. Then I would separate the two kinds of state. Server data has its own problems, such as caching, refetching and stale values, and a library like TanStack Query solves them better than a hand-written store. Interface state is mostly local and is simplest kept in the component. I would suggest a small store only for the few things many screens truly share, and offer to try both approaches on one screen so we compare real code.
25.Design hands you a screen with a custom date picker. How do you make it accessible?
What they're really asking: Do you treat accessibility as part of the job?
Answer outline
- Check whether an existing accessible component can be styled to match before building one.
- If building, follow the ARIA pattern for keyboard navigation and focus, and test it with a screen reader.
26.Your release broke a form for some users, and support tickets are arriving. What do you do?
What they're really asking: Can you handle a front-end incident calmly?
Answer outline
- Roll back or turn off the feature flag first to stop the damage.
- Then reproduce the issue from error reports, add a test for it and ship the fix with a short write-up.
27.A component flickers between a loading state and content on every keystroke. How do you fix it?
What they're really asking: Can you smooth interface behavior during frequent updates?
Answer outline
- Debounce the input or use a deferred value so requests and renders do not fire on every key.
- Keep showing the previous results while new ones load instead of clearing them.
28.Your bundle size doubled after a release. How do you investigate?
What they're really asking: Do you watch what ships to users?
Answer outline
- Run a bundle analyzer and compare it with the previous build to find the new or larger modules.
- Look for a library imported whole instead of in parts, or code that should be lazy-loaded.
29.The team wants to adopt a new state library. How do you decide?
What they're really asking: Do you weigh long-term costs of new tools?
Answer outline
- List the concrete problems with the current approach and check whether the new library solves them.
- Try it on one screen, then compare code size, learning cost and maintenance activity.
30.A React Testing Library test passes locally but fails now and then in CI. What do you do?
What they're really asking: Can you make an unreliable front-end test trustworthy again?
Answer outline
- Run it repeatedly to reproduce, and look for timing assumptions such as fixed waits or animations.
- Replace them with queries that wait for elements to appear, and isolate shared test state.
Red flags to avoid in your answers
Each one is quick to fix before the day.
Reaching for useEffect to compute values that could be derived during render.
Practice explaining when an effect is needed and when a plain calculation is enough.
Adding memoization everywhere without measuring.
Bring one example where the Profiler showed a real cost before you optimized.
Ignoring keyboard and screen-reader users.
Be ready to explain how you test components for accessibility.
Talking only about libraries, never about users.
Tie each technical story to what changed for the people using the screen.
How to prepare for a react developer interview in 7 days
An hour or two a day is enough; the order matters more than the length.
Day 1: Hooks and rendering refresh
Write small examples of state, effects, refs and memoization, and explain when each one re-renders.
Day 2: State design practice
Take one feature and decide where every piece of state lives, then build it with a query cache for server data.
Day 3: Live React reps
Build a searchable, paginated list with loading and error states in a timed sandbox session.
Day 4: Testing session
Write React Testing Library tests for a form, mocking the network with Mock Service Worker.
Day 5: Performance and accessibility
Profile a sample app, fix one slow render, and run an accessibility check with a screen reader.
Day 6: Front-end architecture rehearsal
Sketch how you would structure a dashboard app, covering routing, data loading and shared components.
Day 7: React mock round and recovery
Run a timed mock with a sandbox component task and two behavioral stories, then take the evening off.
Questions to ask the interviewer
Pick two or three; the answers tell you whether you want the job.
- Which React version and framework are you on, and how do you handle upgrades?
- How do you split server data and interface state in the main app?
- Who owns the component library, and how do product teams contribute to it?
- How do you track front-end performance and errors in production?
- What does a typical feature look like from design hand-off to release here?
Preparation tips
- Review hooks, keys, rendering, effects, memoization and controlled forms until you can explain each simply.
- Practice building a small feature, such as a filtered list with loading and error states, in a plain editor.
- Prepare one story where you measured and fixed a slow page with real numbers.
Prepare the general questions too: tell me about yourself, why do you want to work here? and why are you leaving? Afterwards, send a thank-you email; when the offer comes, negotiate the salary.
How we wrote this page
The FindAJobAI team wrote the questions, outlines and sample answers for react developer interviews. The people, employers and numbers in the samples are invented: copy the structure, and use details from your own work.
Once we track enough live react developer job ads, this page also shows the skills they ask for most, counted the same way as our in-demand skills report.
Last reviewed on November 1, 2026.