Lesson 1 of 9 · 22m
Performance Is a User Experience, Not a Lighthouse Score
Learn the core web performance metrics, what they miss in React apps, and how to frame performance work around user-perceived outcomes.
The worst performance review I ever sat through opened with a Lighthouse score of 94. The product manager then pulled out a customer recording: a dashboard took six seconds before the first click did anything, because the hydration bundle arrived after the static HTML looked ready. The score was not wrong; it was answering a different question. React performance starts when you stop optimizing the metric and start optimizing the moment a user thinks, "this app is fighting me."
The metrics that matter
Browser metrics are proxies, not truth. They are still useful when you know what each one can and cannot see:
LCP largest contentful paint did the main thing appear quickly?
INP interaction to next paint did input produce visible feedback quickly?
CLS cumulative layout shift did the interface jump under the user's finger?
TTFB time to first byte was the server or edge slow before React mattered?For single-page React apps, initial page load is only the first chapter. Route transitions, data refresh, opening a modal, typing into a filtered table, and scrolling a long feed are often the real product. Those interactions may not move LCP at all.
Separate lab data from field data
Lighthouse, WebPageTest, and local CPU throttling are lab tools: controlled, repeatable, and excellent for debugging. Real user monitoring is field data: noisy, incomplete, and the only thing that tells you what customers experienced.
import {onINP, onLCP, onCLS} from 'web-vitals'
onINP(metric => sendMetric('inp', metric.value, metric.attribution))
onLCP(metric => sendMetric('lcp', metric.value, metric.attribution))
onCLS(metric => sendMetric('cls', metric.value, metric.attribution))A median is not enough. Look at p75 or p90, then segment by device class, network, route, tenant size, browser, and deployment version. A React app often looks fast on an engineer's M-series laptop while being miserable on a mid-range Android phone.
Write hypotheses in user language
"Reduce render count" is not a performance goal. "The first keystroke in the ticket search box paints within 100 ms for p90 users on mobile" is. That sentence tells you which interaction matters, what budget means success, which population matters, and what evidence you need before and after the fix.
The first-day mental model
React performance problems usually come from one of four buckets:
too much work per render expensive components, selectors, formatting
too many renders broad state updates, unstable identities
too much JavaScript large bundles, eager imports, hydration
too much layout/browser work huge DOM, images, effects that force sync layoutYour job is to identify the dominant bucket before reaching for a favorite tool. useMemo does not fix a 5 MB bundle. Code splitting does not fix a table rendering 50,000 rows. Compression does not fix a render loop.
Field notes
- Lab scores are reproducibility tools; field metrics are truth about experience.
- INP replaced FID because users care about the whole interaction, not merely the first input delay.
- Always attach route and release version to RUM events or regressions become impossible to bisect.
- A good performance bug report includes device, network, account size, exact interaction, and a trace or recording.
Was this lesson helpful?