Next.js vs Astro for a converted Framer site

Next.js or Astro for your Framer site's code? Compare how each export renders pages, handles navigation, hosting, forms and growth, and which fits your team.

Published
Reading time
5 min
Deframer cover: “Next.js or Astro?” Beside it, two cards, Next.js or Astro, with Next.js selected
On this page9 sections

Choose Next.js if the site will grow into an app or you want the widest hosting choice, including platforms that run Next.js with no setup. Choose Astro if the site will stay mostly content, you want every page prerendered to HTML at build time, or your team already works in Astro. When you convert a Framer site with Deframer, both exports contain the same React views, components, styles, CMS JSON and forms; what differs is routing, rendering and the server around them.

Deframer is an independent tool and is not affiliated with, endorsed or sponsored by Framer. It gives you the code of sites you own or have permission to download.

The short comparison

Next.js export

Astro export

Version

Next.js 16, App Router, React 19

Astro 7 with @astrojs/react, React 19

A page is

src/app/**/page.tsx rendering a view

src/pages/**/index.astro with a _route.tsx island

Rendering

Server components and prerendered routes; CMS detail pages prerendered with generateStaticParams

Every page prerendered to HTML by astro build, then hydrated as one React island

Navigation

Next.js client navigation; layouts persist

Astro's router keeps the island mounted; transitions play as view transitions

Metadata

metadata export per page, metadataBase in the root layout

Head of each index.astro; CMS items from _head.json; site tags in src/site/head.ts

Redirects and URL forms

src/proxy.ts and next.config.ts

server.ts (308 redirects)

Forms

src/app/api/forms/<form>/route.ts

src/pages/api/forms/<form>.ts

Env file

.env.local

.env

Node.js

20.9 or later

22.18 or later

Hosting

Vercel, Netlify, Cloudflare via OpenNext, containers, Node servers

Node.js hosts, containers, your own server

How each one renders a Framer page

A Framer page is one tree: its breakpoints, scroll effects and interactions depend on each other. Both exports respect that and render the whole page as React. The difference is the frame around it.

Next.js treats each URL as an App Router route. The route file is a few lines that render a view from src/views, inside the layout template. Next.js handles server rendering, prerendering and client navigation.

Astro writes one index.astro per URL and places the page in a single React island beside it. astro build prerenders every page, CMS items included, so each is a finished HTML document. When a visitor clicks a link, Astro's router loads the next page and keeps the island, so the shared navigation stays mounted with its state.

For visitors, both feel like the original site. For developers, the question is which frame you want to build in.

When does Next.js win?

  • You'll add app features. Accounts, dashboards, payments and per-request data are first-class in Next.js through route handlers, server components and server actions. See adding a backend to a Framer site.
  • You want zero-config hosting. Vercel and Netlify detect and build Next.js automatically. Moving a Framer domain to Vercel walks through it.
  • Your developers already use it. Next.js is the most common React framework, so hiring and AI coding tools both know it well.
  • You want Framer's split tests served as before. The Next.js export keeps each variant and lets src/proxy.ts pick one per visitor.

When does Astro win?

  • The site is content, and will stay content. Every page is prerendered, so serving the site is mostly serving files.
  • You want to add Markdown or MDX pages with Astro's content tools beside the converted pages.
  • Your team builds other sites in Astro and wants one stack.
  • You like a small server you can read. Astro's server.ts applies redirects, serves the prerendered pages and runs Astro's Node handler for form routes, and that's it.

What about performance?

Both start from the same components, styles and assets, so the biggest performance levers are the same: images, fonts and third-party scripts. Astro's prerendering means every page is ready as HTML; Next.js prerenders routes too, and CMS detail pages are prerendered for every item. Neither is automatically faster for a converted Framer page, because the page hydrates as React in both. Measure your own site: comparing PageSpeed before and after converting shows how, and performance tuning a converted site covers the fixes.

Hosting and cost

Next.js has more managed hosts that run it with no configuration, including generous free tiers on some platforms. The Astro export runs its own Node.js server, so it fits any Node host or container: Render, Railway, Fly.io or a VPS. If you want no server at all, neither is the right pick; the static Vite export is.

Day-to-day editing in each

Most edits after a move are the same in both exports, because they happen in shared folders:

Task

Next.js export

Astro export

Change copy on a page

src/views/<page>.tsx

src/views/<page>.tsx

Change a color everywhere

src/styles/tokens.ts

src/styles/tokens.ts

Edit a CMS item

src/cms/<collection>.json

src/cms/<collection>.json

Change a page's title

metadata in src/app/<path>/page.tsx

The head of src/pages/<path>/index.astro

Add a redirect

next.config.ts

src/site/url-policy.ts

Add a new page

A route in src/app and a view

An index.astro with its island and a view, or a plain .astro page

Run locally

npm run dev (port 3000)

npm run dev (astro dev)

The only edits that feel different are routing and metadata. If your team writes new pages often, pick the framework whose routing it already knows.

Can I try both?

Yes. Converting is free, so convert the site twice, once per framework, and compare the code and the result before downloading. Downloading each project uses a credit (1 with verification), or nothing with the lifetime deal for verified sites. Since views, components and CMS files are identical, edits you make in one can be copied to the other.

Guides for each: export to Next.js and convert to Astro. For all five targets side by side, see which framework should your Framer site use?.

FAQ

Is Astro better than Next.js for SEO?

Not inherently. Both exports ship each page's title, description, social image and canonical URL, the sitemap, robots file and redirects, and both serve full HTML. SEO depends far more on keeping URLs and redirects right during the move.

Does the Astro export use many small islands?

No. Each page is one React island, because a Framer page's layout and effects depend on each other. The island stays mounted between pages.

Can I deploy the Astro export to Vercel?

The export runs its own server.ts on Node.js, so the simplest route is a Node.js host or a container. Adapting it to a serverless platform is possible but is your own change to the project.

Which is easier to maintain?

The one your team knows. The page code is identical; only the routing files and server differ.

Can I switch later?

Yes. Converting again for the other framework is free, and the views and components carry over unchanged.