0Pricing
React Academy · Lesson

Measuring Performance: Lighthouse and Core Web Vitals

Compare Lighthouse scores between a full React SPA and an Astro islands approach for the same content.

Measuring Performance: Lighthouse and Core Web Vitals is a free React Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the React Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Measuring Before and After

Lighthouse is the standard tool for measuring web performance. Run it in Chrome DevTools (Lighthouse tab) or via the CLI (npx lighthouse https://yoursite.com). When evaluating Islands Architecture, run Lighthouse on representative pages before and after migration to quantify the gains objectively.

LCP: Largest Contentful Paint

LCP measures when the largest visible content element finishes rendering. Islands Architecture improves LCP because the server sends fully rendered HTML immediately — the browser does not wait for JavaScript to render content. A hero image or headline that would be LCP is painted from the initial HTML response.

JavaScript Is Not Needed for LCP

In a React SPA, LCP is often delayed because the browser must download and execute JavaScript before React renders the LCP element. With Islands Architecture, LCP content is in the initial HTML, so JavaScript execution does not block LCP. This is one of the most significant measurable benefits.

TBT: Total Blocking Time

Total Blocking Time measures how long the main thread is blocked by JavaScript tasks longer than 50ms. Hydrating a large React SPA can produce hundreds of milliseconds of TBT. Islands Architecture drastically reduces TBT because the JavaScript executed is proportional to the number of islands, not the page size.

CLS: Cumulative Layout Shift

Cumulative Layout Shift measures visual stability — elements moving around as the page loads. JavaScript-rendered content can cause layout shifts when React renders and changes dimensions. Server-rendered HTML from Islands Architecture avoids hydration-related layout shifts because the initial layout comes from static HTML that does not change on hydration.

FID and INP: Interaction Responsiveness

First Input Delay (now replaced by Interaction to Next Paint, INP) measures how quickly the page responds to user interactions. Islands architecture improves INP because each island has a small, focused JavaScript bundle. Interactions within an island execute fast because there is no large React tree to schedule work through.

Lighthouse Comparison: SPA vs Islands

A typical comparison for a blog page: a full React SPA might score 45-65 on mobile Lighthouse (TBT: 800ms, LCP: 3.2s). The same content as an Astro site with one React island might score 90-98 (TBT: 80ms, LCP: 1.1s). The gains are most dramatic on content-heavy pages with limited interactivity.

The Trade-Off: Highly Interactive Apps

Islands Architecture is not the right choice for highly interactive applications like dashboards, code editors, or collaborative tools. These apps have components that constantly share state and re-render together — the overhead of cross-island communication would eliminate the performance gains and add architectural complexity.

The Sweet Spot: Content-Heavy Sites

Islands Architecture excels for content-heavy sites with scattered interactivity: blogs (read content, occasional like or comment), documentation (read docs, occasional search or copy-code button), landing pages (mostly static, newsletter form island), and e-commerce product pages (images and description static, add-to-cart island).

Core Web Vitals and SEO

Google uses Core Web Vitals (LCP, INP, CLS) as ranking signals. Improving these metrics with Islands Architecture directly benefits search rankings. A site that improves its Lighthouse mobile score from 55 to 92 by adopting Islands Architecture gains both user experience and SEO benefits simultaneously.

Real-World Migration Data

Teams migrating from Next.js React SPA to Astro for marketing and documentation sites report consistent patterns: JavaScript payloads drop 70-90%, mobile performance scores increase 20-40 points, and server hosting costs decrease because static files are served from CDN without server-side rendering overhead per request.

Total Blocking Time in Islands

Why does Islands Architecture dramatically reduce Total Blocking Time (TBT)?

Lesson Recap

Islands Architecture improves all Core Web Vitals: LCP benefits from server-rendered HTML, TBT drops because JavaScript is proportional to interactivity, CLS is reduced by stable server-rendered layouts, and INP improves with small focused island bundles. Lighthouse scores for content-heavy pages improve dramatically. The pattern is not suitable for highly interactive apps but excels for blogs, docs, landing pages, and e-commerce.

Frequently asked questions

Is the “Measuring Performance: Lighthouse and Core Web Vitals” lesson free?

Yes — the full text of “Measuring Performance: Lighthouse and Core Web Vitals” is free to read here on the web, and the React Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the React Academy course, upgrade to CoddyKit PRO.

What will I learn in “Measuring Performance: Lighthouse and Core Web Vitals”?

Compare Lighthouse scores between a full React SPA and an Astro islands approach for the same content. You practise React Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start React Academy?

No prior experience is required. React Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Measuring Performance: Lighthouse and Core Web Vitals” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this React Academy lesson?

Yes. Every React Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. The Full Hydration Problem
  2. Islands Architecture: Selective Hydration
  3. Astro and React Islands Setup
  4. Measuring Performance: Lighthouse and Core Web Vitals
← Back to React Academy