@sveltejs/kit, astro, gatsby, next, and remix are modern JavaScript frameworks designed to build fast, SEO-friendly web applications with varying approaches to rendering, routing, and data loading. next and remix are React-centric full-stack frameworks that support server-side rendering (SSR), static site generation (SSG), and client-side hydration, with next offering a hybrid per-page rendering model and remix emphasizing web standards and fine-grained data loading. gatsby is a React-based static site generator optimized for content-driven sites using GraphQL to pull data at build time. astro takes a different approach by shipping zero JavaScript by default and only hydrating interactive components when needed, supporting multiple UI libraries including React, Svelte, and Vue. @sveltejs/kit is the official application framework for Svelte, providing SSR, SSG, and client-side navigation with a focus on minimal runtime overhead and seamless integration with Svelte’s reactivity model.
When choosing between @sveltejs/kit, astro, gatsby, next, and remix, you’re not just picking a framework — you’re selecting a philosophy about how web apps should be built, loaded, and updated. Let’s break down how each handles core concerns.
astro ships zero JavaScript by default. Components are rendered to static HTML at build time. Only components marked with a hydration directive (like client:load) become interactive.
<!-- astro: static by default -->
<Header />
<BlogPost title="Hello" />
<Comments client:load /> <!-- Only this becomes interactive -->
gatsby is a static site generator. All pages are pre-built at deploy time using data pulled via GraphQL. No server runs at request time unless you add incremental builds or third-party services.
// gatsby: build-time data fetching
export const query = graphql`
query {
site { siteMetadata { title } }
}
`;
next supports hybrid rendering: each page can independently choose SSR (getServerSideProps), SSG (getStaticProps), or client-side rendering. Incremental Static Regeneration (ISR) allows updating static pages after deploy.
// next: per-page rendering choice
export async function getStaticProps() {
return { props: { /*...*/ }, revalidate: 60 };
}
remix assumes server-first rendering. Every route is server-rendered by default, with client-side hydration only for interactivity. Data is always fresh because loaders run on every request (unless you opt into caching).
// remix: loader runs on server per request
export async function loader({ params }) {
return json(await getPost(params.id));
}
@sveltejs/kit uses adaptive rendering. By default, it server-renders pages and then hydrates them on the client. You can opt into static generation (prerender = true) or disable JavaScript entirely per page.
// @sveltejs/kit: layout.js
export const prerender = true; // generates static HTML
gatsby fetches all data at build time via GraphQL. This works great for known content but fails for user-specific or real-time data unless you layer on client-side fetching.
next loads data per page, either at build (SSG), request (SSR), or in the browser. But if one part of a page needs fresh data, the whole page reloads or you must manage client-side state separately.
remix splits data loading by route segment. A dashboard might have a user profile route and a notifications route — each loads its own data. Mutations use action functions that automatically revalidate related loaders.
// remix: action triggers revalidation
export async function action({ request }) {
await updateSettings(await request.formData());
return redirect("/dashboard"); // refetches all loaders on /dashboard
}
@sveltejs/kit uses load functions that run on both server and client (depending on config). They receive URL params, cookies, and platform context, and can return serializable data directly to the component.
<!-- +page.svelte -->
<script>
export let data; // comes from load()
</script>
<h1>{data.title}</h1>
// +page.js
export async function load({ params, cookies }) {
const theme = cookies.get('theme');
return { title: await getTitle(params.slug), theme };
}
astro loads data at build time in .astro files using await at the top level. For dynamic data, you must drop into client-side JavaScript or use endpoints (.ts files in src/pages/api/).
---
const posts = await fetchPosts();
---
{posts.map(post => <Post {...post} />)}
All five use file-system-based routing, but with key differences:
next: Simple mapping (pages/about.tsx → /about). Dynamic routes use brackets ([id].tsx). No native layout nesting — you compose layouts manually.
remix: Nested routes via folder structure. A route app/routes/dashboard.tsx can have children like app/routes/dashboard/profile.tsx. Parent loaders run alongside child loaders.
@sveltejs/kit: Also uses nested layouts. Files like src/routes/dashboard/+layout.svelte wrap child pages. Layouts can have their own load functions.
gatsby: Uses gatsby-node.js to create pages programmatically, though newer versions support file-based routing via plugins.
astro: Direct file-to-URL mapping (src/pages/blog/[slug].astro → /blog/hello). Supports layout wrappers via <slot /> but no automatic data inheritance between parent and child.
gatsby: Outputs static files. Deploy anywhere (Netlify, S3, etc.). No server needed.
astro: Can output static files (default) or run as an SSR app using adapters (Node, Deno, Cloudflare, etc.).
next: Best on Vercel, but supports Node servers, serverless functions, and edge runtimes. API routes require a JavaScript runtime.
remix: Designed to be runtime-agnostic. Official adapters exist for Node, Cloudflare Workers, Deno, and more. Loaders/actions deploy as serverless or edge functions.
@sveltejs/kit: Uses adapters to target Node, static hosting, Cloudflare, Netlify Edge, etc. The same codebase can be deployed in multiple environments with config changes.
Fast iteration: next and @sveltejs/kit offer hot module replacement and rapid feedback. gatsby’s build step can slow down large sites.
Bundle size: astro and @sveltejs/kit typically produce smaller client bundles due to selective hydration and compiler optimizations. next and remix ship React’s runtime unless you use advanced splitting.
Learning curve: gatsby requires learning GraphQL. remix demands understanding of HTTP semantics (headers, status codes). @sveltejs/kit assumes comfort with Svelte’s reactivity model.
Flexibility vs convention: next gives you options but leaves decisions to you (e.g., state management). remix and @sveltejs/kit provide stronger opinions that reduce boilerplate once adopted.
Despite differences, all five share modern best practices:
Each uses your project’s folder structure to define URLs, reducing boilerplate route config.
First-class TypeScript integration with autocompletion for routes, loaders, and configs.
Built-in support for images, fonts, and CSS — often with optimization (e.g., next/image, Astro’s image service).
All support request interception: next has middleware, remix uses handleDocumentRequest, @sveltejs/kit offers hooks, astro has endpoint handlers, and gatsby uses onRouteUpdate.
Even React-based frameworks now encourage server-rendered fallbacks before JavaScript loads.
| Use Case | Best Fit |
|---|---|
| Marketing site, blog, docs | astro or gatsby |
| E-commerce with mixed static/dynamic content | next (for ISR + API routes) |
| Admin dashboard with real-time data | remix or @sveltejs/kit |
| Svelte-based app with SSR needs | @sveltejs/kit |
| Content site with CMS integration | gatsby (if rebuilds acceptable) or next (with ISR) |
| App requiring edge deployment | remix, @sveltejs/kit, or astro with SSR adapter |
astro.next is the safe default.remix reduces long-term maintenance.@sveltejs/kit is the natural choice.gatsby’s ecosystem is unmatched.The “best” framework isn’t universal — it depends on your team’s expertise, content update frequency, interactivity needs, and deployment constraints. Choose the one that aligns with how you want to think about data, rendering, and user experience.
Choose next if you need maximum flexibility in rendering strategies (SSR, SSG, ISR, or CSR per page), strong Vercel integration, and a mature React ecosystem with features like API routes, middleware, and image optimization. It’s well-suited for everything from landing pages to complex e-commerce platforms. Be prepared to manage hydration mismatches and larger client bundles if not carefully optimized.
Choose astro if your site is mostly static content (blogs, documentation, marketing pages) and you want near-zero client-side JavaScript by default. It excels when you need to mix multiple UI frameworks or prioritize performance through partial hydration. It’s less suited for highly interactive apps that require complex client-side state management across many components.
Choose @sveltejs/kit if you’re building with Svelte and want a full-featured app framework that handles SSR, SSG, and client-side transitions out of the box. It’s ideal when you value minimal JavaScript bundles, reactive state without hooks, and a cohesive developer experience tightly integrated with Svelte’s compiler. Avoid it if your team is committed to React or needs deep ecosystem compatibility with React-specific tooling.
Choose gatsby if you’re building a content-heavy static site (like a blog or documentation hub) and want rich data sourcing via GraphQL from CMSs, APIs, or files. Its plugin ecosystem and build-time optimizations are powerful for predictable, pre-rendered output. Avoid it for dynamic applications requiring real-time data or frequent post-deploy content updates without rebuilds.
Choose remix if you’re building a dynamic, data-driven React app where user experience, resilience, and web standards matter most. Its nested routing, per-route data loading, and progressive enhancement model shine in dashboards, admin panels, or transactional apps. It demands more upfront architectural thinking but reduces client-side complexity over time.
Used by some of the world's largest companies, Next.js enables you to create full-stack web applications by extending the latest React features, and integrating powerful Rust-based JavaScript tooling for the fastest builds.
Visit https://nextjs.org/docs to view the full documentation.
The Next.js community can be found on GitHub Discussions where you can ask questions, voice ideas, and share your projects with other people.
To chat with other community members you can join the Next.js Discord server.
Do note that our Code of Conduct applies to all Next.js community channels. Users are highly encouraged to read and adhere to it to avoid repercussions.
Contributions to Next.js are welcome and highly appreciated. However, before you jump right into it, we would like you to review our Contribution Guidelines to make sure you have a smooth experience contributing to Next.js.
We have a list of good first issues that contain bugs that have a relatively limited scope. This is a great place for newcomers and beginners alike to get started, gain experience, and get familiar with our contribution process.
If you believe you have found a security vulnerability in Next.js, we encourage you to responsibly disclose this and NOT open a public issue.
To participate in our Open Source Software Bug Bounty program, please email responsible.disclosure@vercel.com. We will add you to the program and provide further instructions for submitting your report.