Overview

Pick Next.js when most routes depend on a logged-in user; pick Astro when most routes are content that reads from files or a CMS. As of 2026-10-01 Next.js is at 16.3 (Turbopack default, Cache Components, proxy.ts replacing middleware.ts, React 19.2) and Astro is at 7.3 (Astro 7 shipped 2026-06-22 with Vite 8 and a Rust compiler). A hybrid is common: Astro for marketing and docs, Next.js under /app.

Comparison

DimensionNext.js 16Astro 7
Default client JSServer Components send none, but the React runtime and client components shipNone; islands hydrate only with client:* directives
Best fitDashboards, SaaS, authenticated appsMarketing, blog, docs, catalogs
ComponentsReactReact, Vue, Svelte, Solid, Preact as islands
Data and mutationsServer Components, Server Actions, "use cache"Content Collections, endpoints, Actions, Server Islands
OutputNode server, Docker, static export, or platform adaptersStatic by default; SSR through adapters
BundlerTurbopack (webpack with --webpack)Vite 8

Pick Next.js when

Pick Next.js for apps where server data and sessions are the center.

  • Auth, per-user pages, mutations, and revalidation in one model: Server Components, Server Actions, and updateTag / revalidateTag. See react-server-components.
  • Caching is opt-in with Cache Components (cacheComponents: true, "use cache"); dynamic code runs at request time by default.
  • Streaming with Suspense for personalized pages.
  • Request interception lives in proxy.ts (Node runtime); middleware.ts is deprecated.

Pick Astro when

Pick Astro when content dominates and JavaScript should be opt-in.

  • Prose, docs, and catalogs render to HTML; add one interactive widget as an island.
  • Content Collections give typed frontmatter and MDX with schema validation at build time.
  • Mix frameworks in one site, or migrate between them one island at a time.
  • Static output deploys to any CDN; add an adapter only for server-rendered routes.

Combine or migrate

Split at the URL boundary instead of rewriting a whole site for one feature. Keep Astro on /, /blog, and /docs, run Next.js on /app, and route by path at the CDN or reverse proxy. Next.js to Astro is cheap for content pages: reuse React components as islands. Astro to Next.js is usually triggered by adding auth. From Gatsby or Create React App, go to Next.js if the site is app-shaped and Astro if it is content-shaped.

FAQ

Does Astro ship less JavaScript than Next.js?

Astro ships no client JavaScript by default and hydrates islands only with client:* directives, so content sites send less code. Next.js Server Components send none either, but the React runtime and client components still ship.

Can I use Astro and Next.js on the same domain?

Yes; keep Astro on /, /blog, and /docs, run Next.js on /app, and route by path at the CDN or reverse proxy.

Should I build a blog with Next.js or Astro?

Use Astro for blogs, docs, marketing, and catalogs, since Content Collections give typed frontmatter and MDX with build-time validation. Move to Next.js when most routes depend on a logged-in user.

What replaced middleware.ts in Next.js 16?

Request interception lives in proxy.ts on the Node runtime, and middleware.ts is deprecated.