| Feature | One | TanStack Start | Next.js | React Router v7 |
|---|---|---|---|---|
| Routing | ||||
| File-based routing | Yes | Yes (codegen) | Yes | Manual routes.ts |
| Dynamic routes | [param] |
$param |
[param] |
:param |
| Catch-all routes | [...param] |
$ splat |
[...param] |
* splat |
| Layouts | _layout.tsx |
Parent routes | layout.tsx |
layout() helper |
| Route groups | (group) |
(group) |
(group) |
-- |
| Parallel routes / slots | @slot dirs |
-- | @slot dirs |
-- |
| Intercepting routes | (.) (..) (...) |
-- | (.) (..) (...) |
-- |
| Middleware | _middleware.ts |
Request middleware | middleware.ts (root) |
Unstable flag |
| Rendering | ||||
| SSR | +ssr suffix |
Default | Default | Default |
| SSG | +ssg suffix |
Via Nitro prerender | generateStaticParams |
prerender config |
| SPA mode | +spa suffix |
spa.enabled |
output: 'export' |
ssr: false |
| Per-route render mode | File suffix (+ssr/+ssg/+spa) |
Per-route ssr option |
Per-page dynamic export |
-- |
| Mixed rendering | SPA/SSR/SSG mixed per-layout/route | -- | -- | -- |
| Streaming SSR | Yes (default) | Yes (default) | Yes (default) | Yes |
| ISR | Via cache headers (default) | -- | revalidate export |
-- |
| Partial Prerendering | -- | -- | Yes (Cache Components) | -- |
| React Server Components | -- | -- | Default model | Unstable |
| Data | ||||
| Loaders | export loader |
createFileRoute().loader |
Async server components | export loader |
| Server functions | -- | createServerFn |
"use server" actions |
export action |
| Form component | -- | -- | next/form |
<Form> (progressive) |
| Caching layer | loaderCache |
staleTime/gcTime |
Multi-layer cache | shouldRevalidate |
| Auto revalidation | -- | -- | After server actions | After actions |
| Platform | ||||
| Web | Yes | Yes | Yes | Yes |
| iOS (React Native) | Yes | -- | -- | -- |
| Android (React Native) | Yes | -- | -- | -- |
| Platform-specific routes | .ios .android .native .server |
-- | -- | -- |
| Native navigation (Stack/Tabs) | Yes | -- | -- | -- |
| Type Safety | ||||
| Typed routes | Auto-generated, typed <Link> |
Full codegen, typed <Link> |
typedRoutes config |
typegen CLI |
| Typed params | Yes | Yes (inferred from path) | Yes | Yes (generated) |
| Typed search params | -- | validateSearch (deep) |
-- | -- |
Typed href() |
Yes | Yes | Yes | Yes |
| Environment Guards | ||||
| Server/client boundaries | server-only client-only .server |
Import protection | server-only client-only |
.server.ts .client.ts |
| Platform boundaries | .native .web file variants |
-- | -- | -- |
| Build | ||||
| Bundler | Vite 8 + Rolldown | Vite 7 | Turbopack | Vite |
| React Compiler | Built-in, per-platform | -- | Config option | -- |
| Code splitting | Auto per-route | Auto (component/loader split) | Auto per-route | Auto per-route |
| Security scan (build) | Auto (secret leak detection) | -- | -- | -- |
| Deploy | ||||
| Node.js | Hono (cluster optional) | Nitro | next start |
Express / custom |
| Vercel | Build Output API v3 | Via Nitro | First-class | Community adapter |
| Cloudflare | Build output | Via Nitro | -- | Via adapter |
| Deploy targets | Vercel, Cloudflare, Node | 15+ via Nitro presets | Vercel, Node, Edge, static | Adapter-based |
| Static export | SSG mode | Nitro static preset | output: 'export' |
prerender config |
| DX | ||||
| Image optimization | ?imagedata (Sharp) |
-- | next/image |
-- |
| Font optimization | -- | -- | next/font |
-- |
| Devtools | Record, snapshot, SEO preview | Router devtools (visual) | MCP server | -- |
| Skew protection | Built-in (any host) | -- | Via Vercel only | -- |
| Progressive enhancement | -- | -- | Partial | <Form> works w/o JS |
| Unique to framework | ||||
| Cross-platform (web + native) | Yes | -- | -- | -- |
| Per-file render modes | +ssr/+ssg/+spa suffix |
-- | -- | -- |
| Mixed layout + page rendering | SPA/SSR/SSG mixed per-layout/route | -- | -- | -- |
| Intent-based prefetch | Mouse trajectory prediction | Hover/viewport preload | Hover prefetch | prefetch="intent" |