| 1 | + | --- |
| 2 | + | title: Comparison |
| 3 | + | category: Features |
| 4 | + | order: 99 |
| 5 | + | --- |
| 6 | + | |
| 7 | + | import Link from "../../../../components/Link.jsx"; |
| 8 | + | |
| 9 | + | # Comparison |
| 10 | + | |
| 11 | + | 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. |
| 12 | + | |
| 13 | + | 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. |
| 14 | + | |
| 15 | + | > This comparison is maintained by the `@lazarv/react-server` team. If you find an inaccuracy, please [open an issue](https://github.com/lazarv/react-server/issues) — we want this to be fair and factual. |
| 16 | + | |
| 17 | + | **Legend:** |
| 18 | + | |
| 19 | + | - ✅ — First-class, built-in support that is documented and part of the framework’s intended model |
| 20 | + | - 🟡 — Partial support, important limitations, or support that exists only in a narrower subset of use cases |
| 21 | + | - 🔶 — Possible through userland composition, community plugins, or manual setup, but not a first-class built-in feature |
| 22 | + | - 🛑 — No meaningful built-in support |
| 23 | + | |
| 24 | + | <Link name="full-stack"> |
| 25 | + | ## Full-stack features |
| 26 | + | </Link> |
| 27 | + | |
| 28 | + | | | @lazarv/react-server | Next.js | TanStack Start | React Router | Waku | |
| 29 | + | |--|:---:|:---:|:---:|:---:|:---:| |
| 30 | + | | React Server Components | ✅ | ✅ | 🛑 | 🟡 | ✅ | |
| 31 | + | | Server Functions (actions) | ✅ | ✅ | ✅ | 🟡 | ✅ | |
| 32 | + | | SSR | ✅ | ✅ | ✅ | ✅ | ✅ | |
| 33 | + | | Streaming SSR | ✅ | ✅ | ✅ | ✅ | ✅ | |
| 34 | + | | API Routes | ✅ | ✅ | ✅ | ✅ | ✅ | |
| 35 | + | | API / Route Middleware | ✅ | ✅ | ✅ | ✅ | 🟡 | |
| 36 | + | | Server Function Middleware | 🟡 | 🛑 | ✅ | 🛑 | 🛑 | |
| 37 | + | | Static Site Generation | ✅ | ✅ | 🟡 | 🟡 | ✅ | |
| 38 | + | | Partial Pre-rendering (PPR) | ✅ | ✅ | 🛑 | 🛑 | 🛑 | |
| 39 | + | | Response Caching (TTL) | ✅ | ✅ | 🛑 | 🛑 | 🛑 | |
| 40 | + | | Redirects (server) | ✅ | ✅ | ✅ | ✅ | 🟡 | |
| 41 | + | | Rewrites (server) | ✅ | ✅ | 🛑 | 🛑 | 🛑 | |
| 42 | + | | Reload / Invalidation | ✅ | ✅ | ✅ | ✅ | 🛑 | |
| 43 | + | |
| 44 | + | <Link name="architecture"> |
| 45 | + | ## Architecture |
| 46 | + | </Link> |
| 47 | + | |
| 48 | + | | | @lazarv/react-server | Next.js | TanStack Start | React Router | Waku | |
| 49 | + | |--|:---:|:---:|:---:|:---:|:---:| |
| 50 | + | | Open Runtime (no vendor lock-in) | ✅ | 🟡 <br/> *optimized for Vercel* | ✅ | ✅ | ✅ | |
| 51 | + | | Vite-based | ✅ | 🛑 | ✅ | ✅ | ✅ | |
| 52 | + | | Multiple Deploy Targets | ✅ | 🟡 | ✅ | ✅ | ✅ | |
| 53 | + | | Micro-frontend / Remote Components | ✅ | 🔶 | 🛑 | 🛑 | 🛑 | |
| 54 | + | | MCP Server Integration | ✅ | 🛑 | 🛑 | 🛑 | 🛑 | |
| 55 | + | | Worker / Multi-threaded Rendering | ✅ | 🛑 | 🛑 | 🛑 | 🛑 | |
| 56 | + | | Cluster Mode | ✅ | 🛑 | 🛑 | 🛑 | 🛑 | |
| 57 | + | | Adapter-based Deployment | ✅ | 🟡 | ✅ | ✅ | ✅ | |
| 58 | + | |
| 59 | + | <Link name="routing"> |
| 60 | + | ## Routing |
| 61 | + | </Link> |
| 62 | + | |
| 63 | + | | | @lazarv/react-server | Next.js | TanStack Router | React Router | Waku | |
| 64 | + | |--|:---:|:---:|:---:|:---:|:---:| |
| 65 | + | | Nested / Layout Routes | ✅ | ✅ | ✅ | ✅ | ✅ | |
| 66 | + | | Code-based Routes | ✅ | 🛑 | ✅ | ✅ | 🛑 | |
| 67 | + | | File-based Routes | ✅ | ✅ | ✅ | ✅ | ✅ | |
| 68 | + | | Virtual / Programmatic Routes | ✅ | 🛑 | ✅ | ✅ | 🛑 | |
| 69 | + | | Ranked Route Matching | ✅ | ✅ | ✅ | ✅ | 🛑 | |
| 70 | + | | Suspense Route Transitions | ✅ | ✅ | ✅ | ✅ | 🟡 | |
| 71 | + | | Suspense Route Elements | ✅ | ✅ | ✅ | ✅ | 🟡 | |
| 72 | + | | Error Boundary Elements | ✅ | ✅ | ✅ | ✅ | ✅ | |
| 73 | + | | Loading / Pending Elements | ✅ | ✅ | ✅ | ✅ | 🟡 | |
| 74 | + | | Client-only Routes | ✅ | 🛑 | ✅ | ✅ | 🛑 | |
| 75 | + | | Parallel Routes / Outlets | ✅ | ✅ | 🛑 | 🛑 | 🟡 | |
| 76 | + | | Route Prefetching | ✅ | ✅ | ✅ | ✅ | 🟡 | |
| 77 | + | | Automatic Prefetching | ✅ | ✅ | ✅ | ✅ | 🛑 | |
| 78 | + | | Active Link Customization | ✅ | ✅ | ✅ | ✅ | 🛑 | |
| 79 | + | | Navigation Guards / Blocker | ✅ | 🛑 | ✅ | 🟡 | 🛑 | |
| 80 | + | | `<Form>` Component | ✅ | ✅ | 🛑 | ✅ | 🛑 | |
| 81 | + | | Deferred / Streaming Primitives | ✅ | ✅ | ✅ | ✅ | 🟡 | |
| 82 | + | |
| 83 | + | <Link name="type-safety"> |
| 84 | + | ## Type safety |
| 85 | + | </Link> |
| 86 | + | |
| 87 | + | | | @lazarv/react-server | Next.js | TanStack Router | React Router | Waku | |
| 88 | + | |--|:---:|:---:|:---:|:---:|:---:| |
| 89 | + | | Typesafe Route Paths | ✅ | 🟡 | ✅ | 🟡 | 🛑 | |
| 90 | + | | Typesafe Path Params | ✅ | 🛑 | ✅ | ✅ | 🟡 | |
| 91 | + | | Typesafe Navigation | ✅ | 🟡 | ✅ | 🟡 | 🛑 | |
| 92 | + | | Typesafe Search Params | ✅ | 🛑 | ✅ | 🛑 | 🛑 | |
| 93 | + | | Path Param Validation | ✅ | 🛑 | ✅ | 🛑 | 🛑 | |
| 94 | + | | Path Param Coercion / Parsing | ✅ | 🛑 | ✅ | 🛑 | 🛑 | |
| 95 | + | | Typed Link Components | ✅ | 🛑 | ✅ | 🛑 | 🛑 | |
| 96 | + | | Typed Hooks (useParams, useSearchParams) | ✅ | 🛑 | ✅ | 🟡 | 🛑 | |
| 97 | + | | Auto-generated Route Types (file-router) | ✅ | 🟡 | ✅ | 🛑 | 🛑 | |
| 98 | + | | Branded Outlet Types | ✅ | 🛑 | 🛑 | 🛑 | 🛑 | |
| 99 | + | | Multi-library Schema Support (Zod, ArkType, Valibot) | ✅ | 🛑 | 🟡 | 🛑 | 🛑 | |
| 100 | + | | Lightweight Parse Functions (no schema library) | ✅ | 🛑 | 🛑 | 🛑 | 🛑 | |
| 101 | + | |
| 102 | + | <Link name="search-params"> |
| 103 | + | ## Search params |
| 104 | + | </Link> |
| 105 | + | |
| 106 | + | | | @lazarv/react-server | Next.js | TanStack Router | React Router | Waku | |
| 107 | + | |--|:---:|:---:|:---:|:---:|:---:| |
| 108 | + | | Basic Search Params | ✅ | ✅ | ✅ | ✅ | 🟡 | |
| 109 | + | | Search Param Hooks | ✅ | ✅ | ✅ | ✅ | 🛑 | |
| 110 | + | | Typed Search Params | ✅ | 🛑 | ✅ | 🛑 | 🛑 | |
| 111 | + | | Search Param Schema Validation | ✅ | 🛑 | ✅ | 🛑 | 🛑 | |
| 112 | + | | `<Link>` / `useNavigate` Search API (object, not string) | ✅ | 🟡 | ✅ | 🟡 | 🛑 | |
| 113 | + | | Functional Search Updaters (`prev => next`) | ✅ | 🛑 | ✅ | 🛑 | 🛑 | |
| 114 | + | | Search Param Transforms (encode/decode boundary) | ✅ | 🛑 | ✅ | 🛑 | 🛑 | |
| 115 | + | | Route-scoped Search Transforms | ✅ | 🛑 | 🛑 | 🛑 | 🛑 | |
| 116 | + | | Custom Search Parsing/Serialization | ✅ | 🛑 | ✅ | 🔶 | 🛑 | |
| 117 | + | |
| 118 | + | <Link name="scroll-restoration-comparison"> |
| 119 | + | ## Scroll restoration |
| 120 | + | </Link> |
| 121 | + | |
| 122 | + | | | @lazarv/react-server | Next.js | TanStack Router | React Router | Waku | |
| 123 | + | |--|:---:|:---:|:---:|:---:|:---:| |
| 124 | + | | Window Scroll Restoration | ✅ | 🟡 | ✅ | ✅ | 🟡 | |
| 125 | + | | Element / Container Scroll Restoration | ✅ | 🛑 | ✅ | 🛑 | 🛑 | |
| 126 | + | | Async Content Scroll Restoration | ✅ | 🛑 | ✅ | 🛑 | 🛑 | |
| 127 | + | | Per-route Scroll Customization | ✅ | 🛑 | 🟡 | 🛑 | 🛑 | |
| 128 | + | | Zero-flash Restoration (pre-hydration script) | ✅ | 🛑 | 🛑 | 🛑 | 🛑 | |
| 129 | + | | `prefers-reduced-motion` Aware | ✅ | 🛑 | 🛑 | 🛑 | 🛑 | |
| 130 | + | | Hash / Anchor Scrolling | ✅ | ✅ | ✅ | ✅ | 🛑 | |
| 131 | + | | Config-level Enable (zero code) | ✅ | 🛑 | 🛑 | 🛑 | 🛑 | |
| 132 | + | | Query-only Changes Preserve Scroll | ✅ | 🛑 | 🟡 | 🛑 | 🛑 | |
| 133 | + | |
| 134 | + | <Link name="data-fetching"> |
| 135 | + | ## Data fetching & resources |
| 136 | + | </Link> |
| 137 | + | |
| 138 | + | | | @lazarv/react-server | Next.js | TanStack Router | React Router | Waku | |
| 139 | + | |--|:---:|:---:|:---:|:---:|:---:| |
| 140 | + | | Typed Resource Descriptors | ✅ | 🛑 | 🛑 | 🛑 | 🛑 | |
| 141 | + | | Schema-validated Resource Keys | ✅ | 🛑 | 🟡 | 🛑 | 🛑 | |
| 142 | + | | Suspense-integrated `.use()` Hook | ✅ | 🛑 | ✅ | 🟡 | 🛑 | |
| 143 | + | | Resource Invalidation (per-key) | ✅ | 🟡 | ✅ | 🛑 | 🛑 | |
| 144 | + | | Resource Collections | ✅ | 🛑 | 🛑 | 🛑 | 🛑 | |
| 145 | + | | Route-Resource Binding (prefetch) | ✅ | 🛑 | ✅ | ✅ | 🛑 | |
| 146 | + | | Router Loaders (data fetching) | ✅ <br/> *RSC + resources* | 🟡 | ✅ | ✅ | 🟡 | |
| 147 | + | | SWR / Stale-While-Revalidate Caching | ✅ <br/> *`"use cache"`* | ✅ | ✅ | 🛑 | 🛑 | |
| 148 | + | | Server & Client Loaders | ✅ | 🟡 | ✅ | ✅ | 🛑 | |
| 149 | + | |
| 150 | + | <Link name="developer-experience"> |
| 151 | + | ## Developer experience |
| 152 | + | </Link> |
| 153 | + | |
| 154 | + | | | @lazarv/react-server | Next.js | TanStack Router | React Router | Waku | |
| 155 | + | |--|:---:|:---:|:---:|:---:|:---:| |
| 156 | + | | Zero-config File Router | ✅ | ✅ | 🟡 | 🟡 | ✅ | |
| 157 | + | | MDX Pages | ✅ | 🔶 | 🛑 | 🛑 | 🛑 | |
| 158 | + | | Virtual Routes Module | ✅ | 🛑 | 🟡 | 🟡 | 🛑 | |
| 159 | + | | Route-scoped Loading / Error / Fallback Files | ✅ | ✅ | 🛑 | 🛑 | 🛑 | |
| 160 | + | | Route Devtools | 🛑 | 🛑 | ✅ | 🟡 | 🛑 | |
| 161 | + | | Route Masking | 🛑 | 🛑 | ✅ | 🛑 | 🛑 | |
| 162 | + | | Route-level Typed Dependencies | ✅ <br/> *Typesafe resources* | 🛑 | ✅ <br/> *Typesafe route context + loaders* | 🛑 | 🛑 | |
| 163 | + | | Route Mount / Unmount Events | 🛑 | 🛑 | ✅ | 🛑 | 🛑 | |
| 164 | + | |
| 165 | + | <Link name="notes"> |
| 166 | + | ## Notes |
| 167 | + | </Link> |
| 168 | + | |
| 169 | + | `@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. |
| 170 | + | |
| 171 | + | ### Key architectural differences |
| 172 | + | |
| 173 | + | - **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. |
| 174 | + | - **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. |
| 175 | + | - **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. |
| 176 | + | - **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. |
| 177 | + | - **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. |
| 178 | + | - **No devtools yet**: Route devtools are planned. The tradeoff today is that the typed route system provides compile-time safety that catches most routing errors before they reach the browser. |
| 179 | + | - **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. |
| 180 | + | - **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. |