Astro vs Next.js — Static Simplicity vs Dynamic Overkill
Astro's zero-JS-by-default crushes Next.js for content sites, but Next.js owns complex apps. Pick wrong and you'll ship megabytes of unused code.
Astro
Astro's partial hydration means you ship only the JavaScript you actually need — Next.js defaults to sending your entire React app to the browser, even for static pages. For most websites, that's like bringing a firetruck to water a houseplant.
These aren't even the same kind of tool
Astro is a static site generator that happens to support dynamic islands, while Next.js is a full-stack React framework that happens to support static generation. Astro starts with zero JavaScript and adds interactivity only where you need it — Next.js starts with a full React runtime and tries to optimize it away. If you're building a marketing site, blog, or documentation, Astro is purpose-built; Next.js is what you use when you need server components, API routes, and real-time updates.
Where Astro wins
Astro's killer feature is partial hydration: you can drop React, Vue, or Svelte components into your pages, and Astro strips out their JavaScript unless you explicitly mark them as interactive. That means a typical content site ships <50KB of JavaScript — Next.js can't get below 70KB even for a hello-world page. Astro also has built-in image optimization that doesn't require a separate service, supports Markdown/MDX out of the box without plugins, and its islands architecture means you never have to worry about hydration mismatches. For static sites, Astro's build times are consistently faster because it's not trying to be a Swiss Army knife.
Where Next.js holds its own
Next.js dominates when you need server-side rendering (SSR) with dynamic data — think dashboards, e-commerce, or authenticated apps. Its API routes let you build backend logic right in your project, and React Server Components (still experimental in Astro) allow streaming UI with zero client-side JavaScript. Next.js also has a massive ecosystem — if you need authentication, real-time features, or complex state management, there's a Next.js-specific library for it. Vercel's hosting integration is seamless, with edge functions and incremental static regeneration that Astro can't match without third-party services.
The switching cost gotcha
If you pick Astro and later need full-stack capabilities, you'll be stitching together separate APIs (like Express or Cloudflare Workers) and losing the integrated developer experience. Next.js gives you everything in one box, but that box is heavy — you'll pay for it in bundle size and complexity. Astro's multi-framework support sounds great until you realize you're managing different component lifecycles across React, Vue, and Svelte. Next.js locks you into React, but at least it's a consistent mental model.
If you're starting a project today
Ask one question: do you need dynamic data on every page load? If yes, use Next.js. If no — meaning your site is mostly static content with a few interactive bits — use Astro. For a blog, portfolio, or marketing site, Astro will give you better Lighthouse scores and lower hosting bills. For an app with user accounts, real-time updates, or complex forms, Next.js is worth the overhead. Don't choose based on hype; choose based on how much JavaScript you're willing to force down your users' throats.
What most comparisons get wrong
They treat these as direct competitors, but they solve different problems. Astro is best-in-class for content — it's like a precision scalpel. Next.js is best-in-class for apps — it's like a power drill with every attachment. The real question isn't which is better; it's how much of your site actually needs to be a React app? For 80% of websites, the answer is 'almost none,' which is why Astro is the default pick for anything that isn't a full-blown web application.
Quick Comparison
| Factor | Astro | Nextjs |
|---|---|---|
| Default JavaScript shipped | <50KB for static sites (partial hydration) | 70KB+ (full React runtime) |
| Static site build time | Faster (optimized for static generation) | Slower (general-purpose framework) |
| Server-side rendering (SSR) | Supported but less mature | Excellent (API routes, server components) |
| Hosting cost (static site) | Lower (smaller bundles, no server runtime) | Higher (requires Node.js or Vercel) |
| Framework support | React, Vue, Svelte, Preact, Solid | React only |
| Learning curve | Easier (HTML-first, less tooling) | Steeper (full React ecosystem) |
| Ecosystem & plugins | Growing but smaller | Massive (Vercel marketplace, React libraries) |
| Image optimization | Built-in, no config needed | Requires next/image component |
The Verdict
Use Astro if: You're building a content-heavy site (blog, docs, marketing) where performance is critical and most pages are static.
Use Nextjs if: You need a full-stack app with authentication, real-time features, or complex dynamic routing — and you're all-in on React.
Consider: SvelteKit if you want a middle ground — it's more app-focused than Astro but lighter than Next.js, with built-in SSR and a simpler component model.
Astro's **partial hydration** means you ship only the JavaScript you actually need — Next.js defaults to sending your entire React app to the browser, even for static pages. For most websites, that's like bringing a firetruck to water a houseplant.
Related Comparisons
Disagree? nice@nicepick.dev