Courses / React 19: From Components to Production / Chapter 1
Module 1 · Start Here · Chapter 1 of 30
The React Interview: Rounds, Scoring and a Study Plan
Start here. Next up: JavaScript for React: Values, Closures, Arrays, Async and the DOM.
Part 1 · The rounds a React candidate meets
What this chapter is for
Hiring for React roles runs through a few recurring kinds of round, and each rewards a different kind of preparation. This lesson names them so you can see where each part of the course pays off.
Companies differ a great deal. A startup may run one long pairing session. A large company may run four short rounds in a day. Treat the list below as a menu of formats you may meet, not as a promise that any one company uses all of them, and ask the recruiter what each round will be.
The Front End Interview Handbook, a free guide to these rounds, sorts questions into three groups: trivia questions, coding questions and system design. Its coding group covers three things: algorithms, JavaScript utility functions and user interfaces. The table below splits those groups into the formats a React role tends to use, and adds two that some companies run on top.
The five formats
| Round | What you do | Where the course prepares you |
|---|---|---|
| UI coding (also called machine coding) | build a small working interface from a written brief, such as tabs, an accordion, a todo list or a data table | the foundations, state, forms and data chapters, then the machine coding practice chapter |
| JavaScript coding | write a function or utility in plain JavaScript, often with no framework | the JavaScript chapter at the start |
| React concepts | answer questions on how React works: rendering, state, effects, keys, memoisation | the hooks, rendering, concurrency and render puzzle chapters |
| Front end system design | design the architecture of a larger interface: components, state, data flow, caching, performance | the architecture, data, server and pattern chapters |
| Take-home or code review | build a small project at home, or read and critique someone else's component | the testing, accessibility and security chapters |
No company has to run all five, and the mix depends on the company, the role and the level. Ask which formats your loop uses, then spend your practice time on those first.
The formats also overlap. A UI coding round often turns into a concepts discussion when the interviewer asks why a list flickers, and a design round may end with a short sketch of a component's props. Preparing for each separately still works, because each one tests a skill the others borrow.
What each round looks like
In a UI coding round you get a brief and an editor, sometimes with a live preview and sometimes without. The handbook lists typical tasks: tabs, modal dialogs, accordions, carousels, star ratings, stopwatches, todo lists, data tables and small games such as tic-tac-toe. The handbook names four environments: an online editor with a live preview, an online editor without one, your own machine with your own tools, and, rarely, a whiteboard. It does not give a time limit, so ask for the time box up front, and ask whether you may use a framework or must write plain DOM code.
In a JavaScript round the questions are about the language, not React: write a debounce function, flatten a nested array, implement Promise.all, explain a closure. The next chapter covers the language features React leans on, and these rounds go deeper into the same ground.
In a React concepts round an interviewer asks you to explain, then to predict. "What does this component print?" "Why does this effect run twice?" An answer that says what happens and why, with a small example, gives the interviewer evidence for both understanding and communication. The method in the third lesson is built for these.
In a system design round you sketch the pieces of a larger screen and discuss trade-offs, such as where state lives and how data is fetched and cached. Nothing needs to run, so the skill is speaking about decisions clearly.
Check yourself
Which round asks you to build a small working interface from a brief?
- The UI coding round, also called machine coding.
Why ask the recruiter about the format?
- Companies differ: the same title can mean one long pairing session or several short rounds.
- Knowing it tells you what to practise.
A recruiter says your next round is "build a star rating widget in an online editor with a preview, 45 minutes". Which round is it, and what two things do you ask before you start?
- A UI coding round.
- Ask what the widget must do (for example half stars, read-only mode, keyboard use) and whether React is allowed or plain DOM code is expected.
Part 2 · How answers are scored
The four dimensions
Interviewers do not score "right or wrong" alone. Many companies use a rubric that rates several dimensions separately, then combines them into a recommendation. The Tech Interview Handbook publishes a common one in its coding interview rubrics page, and it has four dimensions for coding rounds.
| Dimension | What the interviewer looks at |
|---|---|
| Communication | whether you clarify the question, explain your approach and narrate while you work |
| Problem solving | whether you understand the problem, choose a sound approach, weigh trade-offs and improve it |
| Technical competency | whether you turn the approach into working, clean code and use the language well |
| Testing | whether you check typical and edge cases, find bugs and verify the result step by step |
In that rubric each dimension gets one of four ratings: strong hire, leaning hire, leaning no hire or strong no hire. Some companies add a middle band for an undecided signal. The handbook describes two ways to combine them: score each dimension, for example from 1 to 4 with 4 as strong hire, and add the scores, or give one overall rating from the whole performance. Either way the result is a judgement, not a strict formula.
Two consequences follow. A correct final answer reached in silence still scores poorly on communication, and a well-explained plan with untested code still loses on testing. And because the ratings are separate, a weak dimension can be lifted on purpose: a candidate who knows testing is their gap can say "let me try the empty case" before the interviewer asks.
What a UI build is judged on
For a build round the Front End Interview Handbook, from the first lesson, lists what to do and what interviewers notice. These come from its page on building user interfaces and apply to React work as well.
- Clarify the requirements first, so you write neither too much nor too little code.
- Make several instances of the component work on one page without affecting each other.
- Offer a simple, configurable API for creating the component, and avoid hardcoded values.
- Handle edge cases: very long strings, large images, a varying number of items and empty states.
- Think about performance with many elements, for example pagination or a virtual list.
- Handle asynchronous issues: race conditions, timeouts, errors and recovery.
- Cover accessibility basics: colour contrast, focus handling, tab order and labels. If you are unsure of a point, say so.
- Prevent cross-site scripting: do not put user input into
innerHTML; prefertextContent. - At the end, say what you would improve for production.
The same page asks a few more questions worth carrying into every build: does the component work on a phone, can its text be translated, does it support right-to-left languages, and does it avoid global variables. You will rarely have time for all of them in a round, but naming the ones you skipped shows you know they exist.
Mapping the criteria to React
Most of those points have a direct React form, and the later chapters teach each one.
| Criterion | In React | Chapter to read |
|---|---|---|
| Several instances on a page | keep state inside the component, not in module variables | state and effects |
| Configurable API | typed props, children and slots, sensible defaults | components, then the pattern chapters |
| Edge cases | empty, loading and error states drawn on purpose | data fetching |
| Many elements | windowing, memoisation, state placement | rendering and performance |
| Races and errors | cleanup in effects, cancelled requests, error boundaries | state and effects, data fetching |
| Accessibility | labels, roles, focus management, keyboard use | accessibility |
| Injection safety | React escapes text for you; avoid dangerouslySetInnerHTML with user input | security |
Practising with the dimensions in mind helps. After every practice build, score yourself on communication, problem solving, technical competency and testing, and note which one was weakest.
Check yourself
Name the four dimensions of the coding rubric.
- Communication, problem solving, technical competency and testing.
Why list edge cases such as an empty list when building a component?
- Edge cases are named in the handbook's criteria for a UI build.
- They show that the component works beyond the happy path.
Your accordion works with ten minutes left, but you never tried it with zero items or a very long title. Which dimension is at risk, and how do you use the time?
- Testing.
- Try the empty case, a long title and keyboard use out loud, fix what breaks, and say which production concerns you would handle next.
Part 3 · A method for answering
Two kinds of question, two methods
A fixed method keeps you from freezing and shows the interviewer how you think, which is what the communication dimension rewards. There are two methods because there are two kinds of question: those that ask you to explain something, and those that ask you to build or fix something.
For a concept question such as "what is a key in a list", answer in four short steps. First define it in one sentence. Then give the mechanism: what React does with it. Then show a small example, a few lines, ideally one where the thing goes wrong. Last, name the trade-off or the case where the answer changes.
For a build or a bug you also work in steps. Clarify the requirements and ask about edge cases. Plan the state: say what data changes and which component owns it. Build the smallest working version first. Add the edge cases. Then test by running it and trying the inputs. Finish with a review: what you would improve.
A worked example
The question: "A button shows the cart count one second after it is clicked, but it shows an old count. Why, and how do you fix it?" Using the concept method: define a stale closure, explain the mechanism, show the example, and give the trade-off.
A closure is a function plus the variables it could see when it was created. Each render of a component creates new handler functions that close over that render's values. The timer callback below was created in the render where the "Show in 1 s" button was clicked, so it keeps that render's count, even though later clicks created newer renders. The code below runs the case twice, once as written and once with the fix.
function Cart({ fixed }: { fixed: boolean }) { const [count, setCount] = useState(0) const latest = useRef(count) useEffect(() => { latest.current = count }) function showLater() { setTimeout(() => { const shown = fixed ? latest.current : count log.push(`${fixed ? 'fixed' : 'stale'}: ${shown} items`) }, 1000) } return ( <> <button onClick={() => setCount(count + 1)}>Add item</button> <button onClick={showLater}>Show in 1 s</button> <p>{count} in cart</p> </> ) }
2 in cart | stale: 0 items 2 in cart | fixed: 2 items
Output of vitest on stale.test.tsx, with fake timers advancing one second.
The stale version printed 0 although the page showed 2 in the cart. The fixed version printed 2. The fix stores the latest count in a ref, a box whose contents survive renders, and updates it after each render with an effect. The timer reads the box, not the closed-over value.
Saying it out loud
The answer on the call might go like this. "The timer callback closes over the count from the render where it was created, so it still sees 0. The page shows 2 because later renders have their own count. One fix is a ref that always holds the latest value, which the callback reads when it fires. The trade-off: a ref does not trigger a render, so use it for reading the latest value in a callback, not for anything shown on screen."
Notice the shape: a definition, the mechanism, the evidence and the limit. It takes under a minute, and each sentence can be probed further. Then check the requirement itself: if the product owner wants the count as it was at the moment of the click, the value the timer printed is the right one and no fix is needed. Asking which is wanted is part of a strong answer.
In a build round, say what you are about to do before doing it: "I will keep the open item id in state in the parent, because both the list and the details panel read it." The interviewer follows your plan and can correct it early.
Common mistakes
- Starting to code before asking about requirements and edge cases.
- Keeping the same data in two places, so they drift apart.
- Going silent for several minutes. Say what you are trying, even when stuck.
- Memorising a definition without being able to give an example that fails.
- Claiming a performance fix without measuring it.
- Never running the code. Testing is a separate dimension of the rubric.
- Over-building: adding features before the first version works.
Check yourself
What are the four steps of a concept answer?
- Define, explain the mechanism, show a small example, name the trade-off.
In the run above, why did the stale version print 0?
- The timer callback closed over the
countof the render in which it was created, and that was 0.
Which step of the build method comes right after planning the state?
- Build the smallest working version.
Part 4 · A study plan for this course
Choose a path
The course is about fifteen hours of reading and running code. You do not need to read it in one order, and the right path depends on how long you have. Each path below names chapters by topic. The course page lists the full order.
| Path | Time | What it covers |
|---|---|---|
| Full course | about 15 hours | every chapter in order, then the practice chapters and the mock |
| Three-week sprint | about 25 minutes a day | state and effects, React 19, advanced hooks, concurrency, forms, data fetching, rendering, Suspense, Server Components, TanStack Query, testing and security, then the practice chapters |
| Senior track | about 6 hours | concurrency, rendering internals, Suspense and streaming, Server Components, architecture, the six pattern chapters, render puzzles and the mock |
| React 18 to 19 | about 3 hours | React 19, forms, concurrency, Suspense and streaming, Server Components and the compiler lesson in the rendering chapter |
If you are new to React, take the full course. If you ship React daily, start at the path that matches your gaps and read a skipped chapter whenever a practice build exposes a hole.
A three-week plan
The weeks below spread the sprint path over 21 days, at about twenty-five minutes of reading a day plus a longer weekend session for practice. If the foundations are new to you, read the JavaScript, introduction and components chapters before week 1. Run every snippet yourself and change it.
| Week | Read | Practise |
|---|---|---|
| 1 | state and effects, React 19, advanced hooks, concurrency | rebuild a todo list and a toggle from memory; explain each render and effect out loud |
| 2 | forms, data fetching, rendering and performance, Suspense and streaming | build a searchable list with loading and error states and a cancelled request; profile it |
| 3 | Server Components, TanStack Query, testing, security | do the timed builds in the machine coding chapter, then the render puzzles |
Finish with the mock interview chapter. Time yourself. Score each answer with the four rubric dimensions from the second lesson, and reread the chapter behind your lowest score.
The order matters more than the pace. Effects make sense only after state, transitions only after the render and commit cycle, and Server Components only after Suspense. If a week runs over, finish its chapters before starting the next week rather than skipping ahead.
How to practise well
- Predict before you run. Write down what a snippet will print, then run it. A wrong prediction marks the lesson to reread.
- Explain aloud. If you cannot explain a render in three sentences, you do not know it yet.
- Rebuild from a blank file. Reading code gives a false sense of skill; typing it exposes gaps.
- Keep a list of mistakes. Review it before a round.
- Practise coding problems on a platform such as LeetCode or NeetCode if your rounds include algorithm questions, and read the Tech Interview Handbook for the process.
Do not try to learn every library. React and the browser are the common ground in every round. Libraries change; the render and commit model, state placement and the browser behind them stay put.
Check yourself
Why read a skipped chapter when a practice build exposes a gap?
- It keeps study driven by real weak spots instead of reading everything in order.
You ship React 18 at work and have a round in ten days. Which path fits, and what do you add if your last mock scored lowest on testing?
- The React 18 to 19 path, about three hours, then the practice chapters.
- Add the testing chapter, and in every practice build try the empty, error and keyboard cases out loud.
What should you do before running a snippet in this course?
- Predict its output, then compare.
- A wrong prediction shows what to reread.
| Term | Meaning |
|---|---|
| UI coding round | a round where you build a small working interface from a brief |
| Rubric | a set of scored dimensions used to rate an answer |
| Concept question | a question asking you to explain how or why something works |
| Stale closure | a callback that still holds the values of an older render |
| Edge case | an input or state outside the usual path, such as an empty list |