react-server675fbba4
react-serverfilesdocssrcpagesen(pages)featurescomparison.mdx
docs/src/pages/en/(pages)/features/comparison.mdxmdx11.2 KiBf7ec0cac

title: Comparison category: Features order: 99

import Link from "../../../../components/Link.jsx";

Comparison

This table compares @lazarv/react-server against other popular React frameworks and routing solutions. The comparison covers full-stack features, architecture, routing, type safety, search params, scroll restoration, and developer experience.

This comparison summarizes the feature set described in the documentation. It focuses on first-class, built-in support rather than custom userland solutions. Some rows describe core architecture, others cover convenience or router ergonomics, so the table should be read as a map of tradeoffs, not a single score.

This comparison is maintained by the @lazarv/react-server team. If you find an inaccuracy, please open an issue β€” we want this to be fair and factual.

Legend:

  • βœ… β€” First-class, built-in support that is documented and part of the framework’s intended model
  • 🟑 β€” Partial support, important limitations, or support that exists only in a narrower subset of use cases
  • πŸ”Ά β€” Possible through userland composition, community plugins, or manual setup, but not a first-class built-in feature
  • πŸ›‘ β€” No meaningful built-in support
<Link name="full-stack"> ## Full-stack features </Link>
@lazarv/react-server Next.js TanStack Start React Router Waku
React Server Components βœ… βœ… πŸ›‘ 🟑 βœ…
Server Functions (actions) βœ… βœ… βœ… 🟑 βœ…
SSR βœ… βœ… βœ… βœ… βœ…
Streaming SSR βœ… βœ… βœ… βœ… βœ…
API Routes βœ… βœ… βœ… βœ… βœ…
API / Route Middleware βœ… βœ… βœ… βœ… 🟑
Server Function Middleware 🟑 πŸ›‘ βœ… πŸ›‘ πŸ›‘
Static Site Generation βœ… βœ… 🟑 🟑 βœ…
Partial Pre-rendering (PPR) βœ… βœ… πŸ›‘ πŸ›‘ πŸ›‘
Response Caching (TTL) βœ… βœ… πŸ›‘ πŸ›‘ πŸ›‘
Redirects (server) βœ… βœ… βœ… βœ… 🟑
Rewrites (server) βœ… βœ… πŸ›‘ πŸ›‘ πŸ›‘
Reload / Invalidation βœ… βœ… βœ… βœ… πŸ›‘
<Link name="architecture"> ## Architecture </Link>
@lazarv/react-server Next.js TanStack Start React Router Waku
Open Runtime (no vendor lock-in) βœ… 🟑 <br/> optimized for Vercel βœ… βœ… βœ…
Vite-based βœ… πŸ›‘ βœ… βœ… βœ…
Multiple Deploy Targets βœ… 🟑 βœ… βœ… βœ…
Micro-frontend / Remote Components βœ… πŸ”Ά πŸ›‘ πŸ›‘ πŸ›‘
MCP Server Integration βœ… πŸ›‘ πŸ›‘ πŸ›‘ πŸ›‘
Worker / Multi-threaded Rendering βœ… πŸ›‘ πŸ›‘ πŸ›‘ πŸ›‘
Cluster Mode βœ… πŸ›‘ πŸ›‘ πŸ›‘ πŸ›‘
Adapter-based Deployment βœ… 🟑 βœ… βœ… βœ…
<Link name="routing"> ## Routing </Link>
@lazarv/react-server Next.js TanStack Router React Router Waku
Nested / Layout Routes βœ… βœ… βœ… βœ… βœ…
Code-based Routes βœ… πŸ›‘ βœ… βœ… πŸ›‘
File-based Routes βœ… βœ… βœ… βœ… βœ…
Virtual / Programmatic Routes βœ… πŸ›‘ βœ… βœ… πŸ›‘
Ranked Route Matching βœ… βœ… βœ… βœ… πŸ›‘
Suspense Route Transitions βœ… βœ… βœ… βœ… 🟑
Suspense Route Elements βœ… βœ… βœ… βœ… 🟑
Error Boundary Elements βœ… βœ… βœ… βœ… βœ…
Loading / Pending Elements βœ… βœ… βœ… βœ… 🟑
Client-only Routes βœ… πŸ›‘ βœ… βœ… πŸ›‘
Parallel Routes / Outlets βœ… βœ… πŸ›‘ πŸ›‘ 🟑
Route Prefetching βœ… βœ… βœ… βœ… 🟑
Automatic Prefetching βœ… βœ… βœ… βœ… πŸ›‘
Active Link Customization βœ… βœ… βœ… βœ… πŸ›‘
Navigation Guards / Blocker βœ… πŸ›‘ βœ… 🟑 πŸ›‘
<Form> Component βœ… βœ… πŸ›‘ βœ… πŸ›‘
Deferred / Streaming Primitives βœ… βœ… βœ… βœ… 🟑
<Link name="type-safety"> ## Type safety </Link>
@lazarv/react-server Next.js TanStack Router React Router Waku
Typesafe Route Paths βœ… 🟑 βœ… 🟑 πŸ›‘
Typesafe Path Params βœ… πŸ›‘ βœ… βœ… 🟑
Typesafe Navigation βœ… 🟑 βœ… 🟑 πŸ›‘
Typesafe Search Params βœ… πŸ›‘ βœ… πŸ›‘ πŸ›‘
Path Param Validation βœ… πŸ›‘ βœ… πŸ›‘ πŸ›‘
Path Param Coercion / Parsing βœ… πŸ›‘ βœ… πŸ›‘ πŸ›‘
Typed Link Components βœ… πŸ›‘ βœ… πŸ›‘ πŸ›‘
Typed Hooks (useParams, useSearchParams) βœ… πŸ›‘ βœ… 🟑 πŸ›‘
Auto-generated Route Types (file-router) βœ… 🟑 βœ… πŸ›‘ πŸ›‘
Branded Outlet Types βœ… πŸ›‘ πŸ›‘ πŸ›‘ πŸ›‘
Multi-library Schema Support (Zod, ArkType, Valibot) βœ… πŸ›‘ 🟑 πŸ›‘ πŸ›‘
Lightweight Parse Functions (no schema library) βœ… πŸ›‘ πŸ›‘ πŸ›‘ πŸ›‘
<Link name="search-params"> ## Search params </Link>
@lazarv/react-server Next.js TanStack Router React Router Waku
Basic Search Params βœ… βœ… βœ… βœ… 🟑
Search Param Hooks βœ… βœ… βœ… βœ… πŸ›‘
Typed Search Params βœ… πŸ›‘ βœ… πŸ›‘ πŸ›‘
Search Param Schema Validation βœ… πŸ›‘ βœ… πŸ›‘ πŸ›‘
<Link> / useNavigate Search API (object, not string) βœ… 🟑 βœ… 🟑 πŸ›‘
Functional Search Updaters (prev => next) βœ… πŸ›‘ βœ… πŸ›‘ πŸ›‘
Search Param Transforms (encode/decode boundary) βœ… πŸ›‘ βœ… πŸ›‘ πŸ›‘
Route-scoped Search Transforms βœ… πŸ›‘ πŸ›‘ πŸ›‘ πŸ›‘
Custom Search Parsing/Serialization βœ… πŸ›‘ βœ… πŸ”Ά πŸ›‘
<Link name="scroll-restoration-comparison"> ## Scroll restoration </Link>
@lazarv/react-server Next.js TanStack Router React Router Waku
Window Scroll Restoration βœ… 🟑 βœ… βœ… 🟑
Element / Container Scroll Restoration βœ… πŸ›‘ βœ… πŸ›‘ πŸ›‘
Async Content Scroll Restoration βœ… πŸ›‘ βœ… πŸ›‘ πŸ›‘
Per-route Scroll Customization βœ… πŸ›‘ 🟑 πŸ›‘ πŸ›‘
Zero-flash Restoration (pre-hydration script) βœ… πŸ›‘ πŸ›‘ πŸ›‘ πŸ›‘
prefers-reduced-motion Aware βœ… πŸ›‘ πŸ›‘ πŸ›‘ πŸ›‘
Hash / Anchor Scrolling βœ… βœ… βœ… βœ… πŸ›‘
Config-level Enable (zero code) βœ… πŸ›‘ πŸ›‘ πŸ›‘ πŸ›‘
Query-only Changes Preserve Scroll βœ… πŸ›‘ 🟑 πŸ›‘ πŸ›‘
<Link name="data-fetching"> ## Data fetching & resources </Link>
@lazarv/react-server Next.js TanStack Router React Router Waku
Typed Resource Descriptors βœ… πŸ›‘ πŸ›‘ πŸ›‘ πŸ›‘
Schema-validated Resource Keys βœ… πŸ›‘ 🟑 πŸ›‘ πŸ›‘
Suspense-integrated .use() Hook βœ… πŸ›‘ βœ… 🟑 πŸ›‘
Resource Invalidation (per-key) βœ… 🟑 βœ… πŸ›‘ πŸ›‘
Resource Collections βœ… πŸ›‘ πŸ›‘ πŸ›‘ πŸ›‘
Route-Resource Binding (prefetch) βœ… πŸ›‘ βœ… βœ… πŸ›‘
Router Loaders (data fetching) βœ… <br/> RSC + resources 🟑 βœ… βœ… 🟑
SWR / Stale-While-Revalidate Caching βœ… <br/> "use cache" βœ… βœ… πŸ›‘ πŸ›‘
Server & Client Loaders βœ… 🟑 βœ… βœ… πŸ›‘
<Link name="developer-experience"> ## Developer experience </Link>
@lazarv/react-server Next.js TanStack Router React Router Waku
Zero-config File Router βœ… βœ… 🟑 🟑 βœ…
MDX Pages βœ… πŸ”Ά πŸ›‘ πŸ›‘ πŸ›‘
Virtual Routes Module βœ… πŸ›‘ 🟑 🟑 πŸ›‘
Route-scoped Loading / Error / Fallback Files βœ… βœ… πŸ›‘ πŸ›‘ πŸ›‘
Devtools βœ… πŸ›‘ βœ… <br/> router only 🟑 πŸ›‘
Route Masking πŸ›‘ πŸ›‘ βœ… πŸ›‘ πŸ›‘
Route-level Typed Dependencies βœ… <br/> Typesafe resources πŸ›‘ βœ… <br/> Typesafe route context + loaders πŸ›‘ πŸ›‘
Route Mount / Unmount Events πŸ›‘ πŸ›‘ βœ… πŸ›‘ πŸ›‘
<Link name="notes"> ## Notes </Link>

@lazarv/react-server is a full React Server Components runtime β€” not just a router. The routing system is deeply integrated with RSC streaming, server functions, and the Vite build pipeline. This means features like typed routes, client-only routes, and server-side validation work end-to-end without glue code.

Key architectural differences

  • RSC-native: Unlike routers that bolt RSC support on top, @lazarv/react-server was built from the ground up for React Server Components. Every route can mix server and client components freely.
  • Client-only routes: Pages with "use client" in the file-system router are automatically client-only β€” navigation skips the server entirely. No configuration needed, and component state is preserved across navigations via React's <Activity> component.
  • Schema-agnostic validation: Route params and search params can be validated with any schema library (Zod, ArkType, Valibot) or lightweight parse functions β€” the runtime detects the validation strategy automatically.
  • RSC + typed resources: @lazarv/react-server offers two complementary data-fetching approaches: React Server Components with async/await (RSC as loaders), and typed resources β€” schema-validated, reference-identified data descriptors with .use() (suspense), .query() (imperative), .prefetch(), and .invalidate(). Resources use "use cache" as the caching runtime β€” no custom cache layer, no SWR boilerplate. Route-resource bindings enable parallel prefetching on navigation.
  • Route-level dependencies: TanStack Router exposes route context as a first-class typed primitive for passing dependencies (auth, DB clients, etc.) down the route tree. @lazarv/react-server models the same problem space through typed resources, request context, and native modules β€” there is no separate route-context bag because resources already carry schema-validated, route-scoped data with full type safety.
  • Built-in devtools: @lazarv/react-server ships with integrated devtools (--devtools) that go beyond route inspection β€” they cover RSC payload, cache entries, routes, outlets, remote components, live components, workers, and server logs in a single panel. TanStack Router provides excellent router-focused devtools, but @lazarv/react-server's devtools cover the full server component runtime.
  • Outlets vs. parallel routes: @lazarv/react-server uses named outlets (@sidebar, @content) rendered as typed props to layouts. This is functionally similar to Next.js parallel routes but with stronger typing β€” each outlet is a branded React element that prevents accidentally swapping outlets.
  • Waku: Waku is another RSC-native framework built on Vite, but takes a deliberately minimal approach. It provides basic file-based routing with layouts and RSC support, but lacks the typed routing system, search param handling, scroll restoration, middleware, and most advanced routing features. Waku's Link component supports basic scroll and prefetchOnEnter/prefetchOnView props, but most of its router API is still marked as unstable_. Waku is a good choice for simple RSC applications that don't need advanced routing.