Astro vs Next.js

Both are file-based frameworks with excellent tooling, and the choice between them is usually decided by what you are building. Next.js starts from a React application. Astro starts from an HTML document and adds JavaScript where a component needs it.

Side by side

What each stack does, rather than which one wins. Every row is something you can verify in either project's own documentation.

Astro compared with Next.js, by what each one does.
What is comparedAstroNext.js
Default outputA page with no client-side framework code at all until a component asks for it.A React application. Server components cut down what is sent, but the client parts still arrive with the framework runtime.
Component modelAstro components render on the server; React, Vue, Svelte, Solid and Preact can run beside them as islands.React throughout, which keeps one mental model across the whole project.
How interactivity is declaredPer component, with a client directive that also says when to hydrate: on load, when idle, when visible or on a media query.Per module boundary, with the client directive at the top of a file and the tree below it hydrated.
What the host has to runNothing, for a static build. An adapter adds a Node, Vercel, Netlify or Cloudflare runtime where a route needs one.A runtime that supports the Next.js build output for anything beyond a static export.
Data and contentContent collections with a schema, validated during the build.Data fetched in server components, with caching and revalidation handled by the framework.
Be fair about it

Where Next.js is still the better answer

  • Applications rather than sites: dashboards, authenticated areas and anything with substantial client-side state.
  • Teams already standardised on React, where a second component model costs more than it saves.
  • Very large dynamic catalogues that lean on the framework's caching and incremental revalidation.
Choosing

Which one for which project

Astro
Content-led sites where most pages are documents, and the interactive parts are a handful of components rather than the whole page.
Next.js
Products where the page is an application: session state, live data and routes that only make sense once a user is signed in.
Method

No figures here, and why

A speed comparison between two different sites measures the sites, not the stacks — and a number without its URL, date and throttling profile ages badly. Measure the project in front of you instead:

  1. 01

    Compare the same page, not two different designs. A homepage with a video and a homepage with a heading are not a measurement.

  2. 02

    Look at transferred bytes and the number of requests in the network panel, with the cache disabled and a cold profile.

  3. 03

    Run the audit three times on the same throttling profile and report the median, not the best run.

  4. 04

    Then check field data, which is what visitors actually experienced: the Core Web Vitals technology report is built from real Chrome users and is public.

  5. 05

    Publish the URL, the date, the device and the throttling profile with every number, so someone else can get the same result.

Deliver client sites at agent speed

Buy your licence. Download Astrology. Start creating.

Requires Node.js, npm and Git · AI features use your installed agent CLI