Skip to main content

React Live Coding Round

Live coding evaluates how you clarify, model state, choose semantics, narrate trade-offs, debug, adapt requirements, and preserve testabilityβ€”not only whether the final component renders.

Round format​

10–5 clarify
25–25 implement
325–40 change requirements
440–50 debug edge cases
550–60 tests/design

Task 1 β€” searchable user list​

Build a labeled search input, user list with stable IDs, empty state, and name/email filtering.

How should the first implementation handle search?
Small in-memory listquery state + derive filtered users during render
50,000 users and measured rendering is slowProfile, then virtualization/server search/deferred rendering as appropriate
Search moves to APIAdd data-layer loading/error/race/cancellation and optional network debounce

Do not create Effect-synchronized filtered state merely to store a derived list.

Task 2 β€” editable todo list​

Implement add/toggle/delete/edit plus all/active/completed filtering.

Keep one canonical todo model and derive views
Canonical todos
IDs Β· title Β· completed
Visible todos
filter-dependent projection

A late β€œundo last action” requirement is a good reason to reconsider transition modeling and possibly introduce reducer/history state rather than stacking unrelated variables.

Task 3 β€” reusable dialog​

Requirements include portal rendering, accessible title, Escape, focus entry, focus restoration, backdrop behavior, and controlled/uncontrolled API discussion.

A dialog implementation is a full focus/interaction lifecycle
1Trigger activated
2Dialog commits
3Focus enters
4Modal interaction
5Close/Escape
6Focus restored

Discuss what belongs in the design-system primitive versus the product consumer.

Task 4 β€” diagnose request-race code​

function Profile({ userId }) {
const [user, setUser] = useState(null);
const [loading, setLoading] = useState(false);

useEffect(() => {
setLoading(true);
fetch(`/api/users/${userId}`)
.then(r => r.json())
.then(data => {
setUser(data);
setLoading(false);
});
}, [userId]);

if (loading) return <p>Loading...</p>;
return user ? <ProfileView user={user} /> : null;
}
What should you notice before rewriting it?
Older request can finish after newer userIdRace/order handling is missing
Request can failError state/behavior is missing
Old profile disappears during refreshClarify desired stale/pending UX
Fetching is owned by EffectAsk whether target architecture has a better data layer/framework owner

If the product later wants stale content to remain visible, model that UX intentionally rather than clearing state by reflex.

Task 5 β€” form mutation​

Build title input, validation, pending, server error, success, and accessible feedback.

A production form crosses UX and server correctness layers
Client UX
labels Β· draft Β· helpful validation
Server trust
runtime validation Β· authorization Β· duplicate protection
Recovery
pending Β· error summary Β· focus Β· success

Debugging mini-round​

Given a draft reset Effect depending on a whole document object, ask whether object identity is semantically meaningful, whether document.id is the real identity, or whether a keyed editor better expresses β€œnew document means fresh draft.”

Late requirement changes​

A strong interviewer changes one condition: keyboard support, controlled mode, server persistence, optimistic updates, 100k rows, hidden-view state preservation, SSR/hydration, analytics, or testability.

The goal is to see whether architecture bends or breaks
Initial simple design
correct for known requirements
Re-evaluate ownership/boundaries
adapt, do not defend sunk cost
Still understandable
minimal new complexity

Scoring rubric​

DimensionWeight
Correctness25%
State model20%
React reasoning15%
Accessibility10%
Debugging10%
Communication10%
Adaptability10%

Strong behavior​

1Clarify
2Start simple
3Narrate ownership
4Test risky paths
5Adapt constraints
6Explain production next steps

Avoid synchronized state copies, Effect-hidden business logic, inaccessible custom controls, automatic memoization everywhere, and silent coding with no explanation of decisions.