In the Astro vs Remix decision, choose Astro for content-driven sites such as marketing pages, blogs, docs and catalogues, where most of each page is static content with a few interactive parts. Choose Remix, which now ships as React Router 7 in framework mode, for React applications built around forms, mutations and per-user data, where nearly every screen is interactive and rendered on the server.
A naming note first, because it confuses many searches. Remix v2 merged into React Router 7 in late 2024: the loaders, actions and nested routes you know from Remix are now React Router’s “framework mode”, and upgrading a Remix v2 app means moving to React Router 7. The Remix team has also announced Remix 3 as a separate, new framework with a different design. This comparison covers React Router 7, since that is where Remix-style apps are built today.
Key Takeaways
- Astro starts from zero client JavaScript and adds it per component; React Router 7 ships React and hydrates every page.
- React Router 7’s strength is data flow: loaders, actions and automatic revalidation after form submissions.
- Astro’s strength is content: built-in content collections, Markdown and MDX, and image optimisation.
- Both can prerender static pages and server-render others; their defaults differ.
- Many teams use both: Astro for the public site, React Router 7 for the logged-in app.
Quick comparison
| Astro | Remix / React Router 7 | |
|---|---|---|
| Primary use | Content sites with islands of interactivity | Server-rendered React apps |
| UI framework | Any (.astro, React, Vue, Svelte, Solid, Preact) |
React |
| Default output | Static HTML, prerendered at build time | Server-rendered on each request |
| Client JavaScript by default | None | React runtime plus route code |
| Data loading | Top-level await in component frontmatter |
loader per route |
| Mutations | Astro Actions, API endpoints, forms | action per route with revalidation |
| Content and Markdown | Built-in content collections, MDX integration | Bring your own |
| Static prerendering | Default | prerender option in react-router.config.ts |
| Build tool | Vite | Vite |
Rendering model and JavaScript shipped
The biggest difference is the default.
Astro renders every component to HTML on the server or at build time and sends no JavaScript for it. If a component needs to be interactive, you add a client directive such as client:visible, and only that component hydrates. The rest of the page stays plain HTML. This is the islands architecture, also explained in what Astro is.
React Router 7 renders React on the server for the first request, then hydrates the whole page so React takes over in the browser. Navigations after that fetch data from loaders and render on the client, which makes transitions between pages feel instant. The trade-off is that every page carries React and the route’s components, even if the page is mostly text.
For a blog post or a pricing page, Astro will usually ship far less JavaScript. For a dashboard where every element responds to the user, the hydrated React model is a better fit, and the difference in shipped code matters less because you need most of it anyway.
Data loading and forms
Remix’s reputation comes from its data model, and React Router 7 keeps it. Each route exports a loader for reads and an action for writes. A form posts to its route’s action, and after the action runs, React Router revalidates the loaders on the page automatically, so the UI never shows stale data. The React Router framework mode docs cover setup.
// app/routes.ts
import { type RouteConfig, index, route } from '@react-router/dev/routes';
export default [
index('routes/home.tsx'),
route('blog/:slug', 'routes/post.tsx'),
] satisfies RouteConfig;
// app/routes/post.tsx
import type { Route } from './+types/post';
import { getPost } from '../lib/posts.server';
export async function loader({ params }: Route.LoaderArgs) {
const post = await getPost(params.slug);
if (!post) throw new Response('Not found', { status: 404 });
return { post };
}
export default function Post({ loaderData }: Route.ComponentProps) {
const { post } = loaderData;
return (
<article>
<h1>{post.title}</h1>
<div dangerouslySetInnerHTML={{ __html: post.html }} />
</article>
);
}
The same page in Astro reads from a content collection at build time. There is no loader; the frontmatter runs on the server and the result is static HTML:
---
// src/pages/blog/[id].astro
import { getCollection, render } from 'astro:content';
export async function getStaticPaths() {
const posts = await getCollection('blog');
return posts.map((post) => ({ params: { id: post.id }, props: { post } }));
}
const { post } = Astro.props;
const { Content } = await render(post);
---
<article>
<h1>{post.data.title}</h1>
<Content />
</article>
Astro handles forms too. Astro Actions give you typed server functions with validation, and an on-demand route can read form data from Astro.request. What Astro does not have is Remix-style automatic revalidation across a page of client-rendered components, because most Astro pages are not client-rendered. If your app depends on that flow, React Router 7 is the better tool. Our Astro SSR guide covers Astro’s server features in detail.
Static sites and prerendering
Astro prerenders everything by default. To render a route on demand, you add an adapter and opt that route out with export const prerender = false. Which Astro rendering mode to use explains the options.
React Router 7 defaults to server rendering but can prerender. The prerender option in react-router.config.ts lists paths to render at build time, and ssr: false turns the app into a static single-page app:
// react-router.config.ts
import type { Config } from '@react-router/dev/config';
export default {
ssr: true,
async prerender() {
return ['/', '/about', '/pricing'];
},
} satisfies Config;
Prerendered React Router pages are still hydrated React pages in the browser. You get static hosting and fast first paint, but not Astro’s zero-JavaScript output.
Content, Markdown and SEO
Astro was designed for content. Content collections validate Markdown, MDX, JSON and YAML against a schema, astro:assets optimises images, and integrations for sitemaps, RSS and MDX are official. A blog or docs site needs very little setup. Starlight, Astro’s docs framework, builds on this.
React Router 7 leaves content to you. You can read Markdown in a loader with a library such as unified or use an MDX plugin for Vite, but there is no built-in content layer or schema validation. Meta tags are handled with a route-level meta export or by rendering title and meta elements in components.
Both can produce well-optimised, crawlable pages. Astro gets there with less configuration for content-heavy sites.
Hosting and deployment
Both build with Vite and deploy widely.
- Astro static sites deploy to any static host, such as Cloudflare Pages, Netlify, Vercel or GitHub Pages, with nothing to run. On-demand routes need an adapter for Node.js, Cloudflare, Netlify or Vercel.
- React Router 7 apps need a server or serverless runtime unless fully prerendered or in SPA mode. Official templates and adapters cover Node.js, Cloudflare Workers, Vercel and Netlify.
A static Astro site is usually cheaper and simpler to run, because there is no server to keep alive. See our static deployment docs for the common hosts.
Choose Astro if, choose Remix if
Choose Astro if:
- The site is mostly content: marketing pages, blog, docs, portfolio, catalogue.
- You want the smallest possible JavaScript payload and strong Core Web Vitals with little tuning.
- Your team uses more than one UI framework, or wants to write mostly HTML and CSS.
- You want Markdown and MDX content with schema validation built in.
Choose Remix (React Router 7) if:
- You are building an application: dashboards, admin tools, account areas, multi-step forms.
- Most pages depend on the logged-in user and change after every action.
- Your team is already invested in React and wants one framework for the whole app.
- You value loaders, actions and automatic revalidation as the core data model.
Using Astro and React Router together
The common split is an Astro marketing site at example.com and a React Router 7 app at app.example.com. The public pages stay static and fast; the app gets the data model it needs. Shared React components, such as a pricing table or a signup form, can be used in both: in Astro they run as islands with a client directive.
If you want the marketing half finished quickly, an Astro theme with pricing, customer and changelog pages already built can save a lot of time; you can browse Astro themes by category. For the framework comparison most people ask about next, see Astro vs Next.js.
FAQ
Is Remix still a separate framework?
Remix v2’s features merged into React Router 7, released in late 2024, and Remix v2 apps upgrade to React Router 7 framework mode. The Remix team has announced Remix 3 as a new, separate framework with a different design, so check its current status in the official Remix docs before choosing it for a new project.
Is Astro faster than Remix?
For content pages, Astro usually ships much less JavaScript, because it sends none by default while React Router 7 hydrates React on every page. That tends to mean faster loads on slow devices. For app-like navigation after the first load, React Router’s client-side transitions can feel faster. Measure your own pages rather than relying on general claims.
Can I use React components in Astro?
Yes. Install the @astrojs/react integration and import React components into .astro files. Without a client directive they render to static HTML; with client:load, client:visible or client:idle they hydrate as interactive islands.
Can Remix or React Router 7 build a static site?
Yes. React Router 7 can prerender listed paths at build time with the prerender option, or build a single-page app with ssr: false. The pages still hydrate React in the browser, unlike Astro’s zero-JavaScript static output.
Should I migrate from Remix to Astro?
Only if your app is mostly content. A marketing site or blog built in Remix can move to Astro with the React components reused as islands. A data-heavy application with forms and per-user data is usually better kept in React Router 7.