Migration · Next.js → Astro

From Next.js to Astro when your project is content.

Moving from Next.js to Astro pays off when your project is content at heart: a marketing site, docs or a blog. Astro ships static HTML by default, and your React components can come along.

React can stay

Astro is UI-framework agnostic with an official React integration. Existing components keep running as islands.

No client JavaScript by default

Astro removes all client-side JavaScript from components by default. Hydration is an opt-in per component.

A documented path

The Astro docs carry a migration guide for Next.js. They also note that many of those guides are stubs.

00 — Our Projects

Our own products, live in the browser.

Screenshots from Mini Marvin, our own progressive web app running in the browser.

Mini Marvin · PWA

Swipe baby names instead of scrolling

Mini Marvin is our progressive web app for finding baby names: swipe through 10,000+ first names right in the browser, no app store needed.

Mini Marvin App – Swipe baby names instead of scrolling Mini Marvin App – Decide together as a couple Mini Marvin App – Filter by origin & popularity
01 — The verdict first

Next.js to Astro in four points.

The verdict first

Move when it is a content site.

  • Marketing site, docs, blog, careers pages.
  • Astro ships prerendered HTML, with interactivity only where it is needed.

Stay when it is an application.

  • Login, roles, client state shared across routes and a dashboard with many states.
  • Next.js is the better fit there.

Your React components survive.

  • Astro integrates React officially.
  • An existing component library gets mounted as islands, never thrown away.

The difference is the default.

  • Astro prerenders by default.
  • Individual routes render on demand once you set export const prerender = false and install an adapter.

Move or stay? We will check.

Describe in three sentences what your Next.js project is today: marketing site, docs, product or all of it at once.

02 — The decision

Move to Astro or stay on Next.js.

The dividing line sits at one question: do you run an application, or do you publish content?

Move to Astro when …

  • Your repository is called website or docs and still carries the full stack of an application.
  • Most of your pages are static. The interactive parts are a menu, a form, a filter and a calculator.
  • Your Core Web Vitals suffer from the JavaScript you ship, and optimisation means trimming framework code.
  • Editors and marketing wait on engineering because the content model lives in props and fetch calls.

Stay on Next.js when …

  • Your product is an application: authentication, roles, user accounts, a dashboard with genuine state.
  • You need client state shared across routes: a cart, a filter session, multi-step forms without a reload.
  • Your architecture rests on Next-specific building blocks: middleware patterns, ISR semantics, App Router composition.
  • It runs, it is measurably fast enough, and nobody is in pain.
03 — Process

How a migration from Next.js to Astro runs.

Five steps, and the first one decides the recommendation.

Take stock

Sort routes into purely static, static with one island, genuinely dynamic. Plus URLs and field data.

Define the content model

MDX files, CMS responses and hand-typed props become content collections with a Zod schema.

Mount React as islands

Import into an .astro file, then client:load, client:visible or client:idle per component.

Map routes and URLs

The structure stays identical. Every unavoidable change gets a 301 redirect up front.

Launch and re-measure

Watch indexing, positions and field data for several weeks, then hand over repository and README.

04 — FAQ

Frequently asked questions about moving from Next.js to Astro.

Can we keep our React components?

Yes, and it is the most important technical point of this migration. Astro is UI-framework agnostic with an official React integration, alongside Preact, Svelte, Vue, SolidJS and Alpine.js. A component gets imported and mounted as an island via a client:* directive.

What happens to server components and the App Router?

Those concepts get replaced. In Astro, prerendering is the default: the whole site is prerendered unless told otherwise. Dynamics appear where you ask for them, via export const prerender = false plus an adapter for the route, or via server islands with server:defer.

We use ISR. Does Astro have an equivalent for revalidation?

There is no one-to-one equivalent. Three routes lead to the same place: prerendered HTML rebuilt when content changes; routes with export const prerender = false plus an adapter; and server islands, where shell and main content stay cached while personalised elements load in.

How long does a Next.js to Astro migration take?

A docs or marketing site with few layouts, one language and no CMS: 4 to 7 weeks. A grown site with a CMS, two languages and several dynamic routes: 8 to 14 weeks. Then 8 to 12 weeks of monitoring.

What does a Next.js to Astro migration cost?

The range comes from the number of distinct page types, the depth of the content model and the Next-specific building blocks that something depends on. After taking stock you get an estimate with its assumptions, see Astro development cost.

Can we maintain content afterwards without a developer?

Yes. Content collections with a Zod schema or a connected headless CMS, and on request also by chat. We work AI-assisted and run a WhatsApp AI agent. Day-to-day operation is covered by support and maintenance.

Is your Next.js project an application or content?

Tell us briefly what is live today and where it hurts. You get an assessment of the move, the effort and the alternatives.

— Contact

Request a Next.js to Astro migration.

Repository size, page types and Next-specific dependencies: three sentences are enough for a first assessment.

Call now +49 155 63582204 Message on WhatsApp Write an email

We usually reply within 24 hours.
Remote and on site in Germany, Austria and Switzerland. International projects on request.

What is it about?
Timeframe (optional)

Your details are only used to process this inquiry – no newsletters, no sharing.