-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
docs: Add comparison page back #5503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| --- | ||
| title: Comparison | TanStack Router & TanStack Start vs Next.js vs React Router / Remix | ||
| toc: false | ||
| --- | ||
|
|
||
| Choosing a routing solution? This side‑by‑side comparison highlights key features, trade‑offs, and common use cases to help you quickly evaluate how each option fits your project’s needs. | ||
|
|
||
| While we aim to provide an accurate and fair comparison, please note that this table may not capture every nuance or recent update of each library. We recommend reviewing the official documentation and trying out each solution to make the most informed decision for your specific use case. | ||
|
|
||
| If you find any discrepancies or have suggestions for improvement, please don't hesitate to contribute via the "Edit this page on GitHub" link at the bottom of this page or open an issue in the [TanStack Router GitHub repository](https://github.com/TanStack/router). | ||
|
|
||
| Feature/Capability Key: | ||
|
|
||
| - ✅ 1st-class, built-in, and ready to use with no added configuration or code | ||
| - 🟡 Partial Support (on a scale of 5) | ||
| - 🟠 Supported via addon/community package | ||
| - 🔶 Possible, but requires custom code/implementation/casting | ||
| - 🛑 Not officially supported | ||
|
|
||
| | | TanStack Router / Start | React Router DOM [_(Website)_][router] | Next.JS [_(Website)_][nextjs] | | ||
| | ---------------------------------------------- | ------------------------------------------------ | ----------------------------------------------------- | ----------------------------------------------------- | | ||
| | Github Repo / Stars | [![][stars-tanstack-router]][gh-tanstack-router] | [![][stars-router]][gh-router] | [![][stars-nextjs]][gh-nextjs] | | ||
| | Bundle Size | [![][bp-tanstack-router]][bpl-tanstack-router] | [![][bp-router]][bpl-router] | ❓ | | ||
| | History, Memory & Hash Routers | ✅ | ✅ | 🛑 | | ||
| | Nested / Layout Routes | ✅ | ✅ | 🟡 | | ||
| | Suspense-like Route Transitions | ✅ | ✅ | ✅ | | ||
| | Typesafe Routes | ✅ | 🟡 (1/5) | 🟡 | | ||
| | Code-based Routes | ✅ | ✅ | 🛑 | | ||
| | File-based Routes | ✅ | ✅ | ✅ | | ||
| | Virtual/Programmatic File-based Routes | ✅ | ✅ | 🛑 | | ||
| | Router Loaders | ✅ | ✅ | ✅ | | ||
| | SWR Loader Caching | ✅ | 🛑 | ✅ | | ||
| | Route Prefetching | ✅ | ✅ | ✅ | | ||
| | Auto Route Prefetching | ✅ | ✅ | ✅ | | ||
| | Route Prefetching Delay | ✅ | 🔶 | 🛑 | | ||
| | Path Params | ✅ | ✅ | ✅ | | ||
| | Typesafe Path Params | ✅ | ✅ | 🛑 | | ||
| | Typesafe Route Context | ✅ | 🛑 | 🛑 | | ||
| | Path Param Validation | ✅ | 🛑 | 🛑 | | ||
| | Custom Path Param Parsing/Serialization | ✅ | 🛑 | 🛑 | | ||
| | Ranked Routes | ✅ | ✅ | ✅ | | ||
| | Active Link Customization | ✅ | ✅ | ✅ | | ||
| | Optimistic UI | ✅ | ✅ | 🔶 | | ||
| | Typesafe Absolute + Relative Navigation | ✅ | 🟡 (1/5 via `buildHref` util) | 🟠 (IDE plugin) | | ||
| | Route Mount/Transition/Unmount Events | ✅ | 🛑 | 🛑 | | ||
| | Devtools | ✅ | 🟠 | 🛑 | | ||
| | Basic Search Params | ✅ | ✅ | ✅ | | ||
| | Search Param Hooks | ✅ | ✅ | ✅ | | ||
| | `<Link/>`/`useNavigate` Search Param API | ✅ | 🟡 (search-string only via the `to`/`search` options) | 🟡 (search-string only via the `to`/`search` options) | | ||
| | JSON Search Params | ✅ | 🔶 | 🔶 | | ||
| | TypeSafe Search Params | ✅ | 🛑 | 🛑 | | ||
| | Search Param Schema Validation | ✅ | 🛑 | 🛑 | | ||
| | Search Param Immutability + Structural Sharing | ✅ | 🔶 | 🛑 | | ||
| | Custom Search Param parsing/serialization | ✅ | 🔶 | 🛑 | | ||
| | Search Param Middleware | ✅ | 🛑 | 🛑 | | ||
| | Suspense Route Elements | ✅ | ✅ | ✅ | | ||
| | Route Error Elements | ✅ | ✅ | ✅ | | ||
| | Route Pending Elements | ✅ | ✅ | ✅ | | ||
| | `<Block>`/`useBlocker` | ✅ | 🔶 (no hard reloads or cross-origin navigation) | 🛑 | | ||
| | Deferred Primitives | ✅ | ✅ | ✅ | | ||
| | Navigation Scroll Restoration | ✅ | ✅ | ❓ | | ||
| | ElementScroll Restoration | ✅ | 🛑 | 🛑 | | ||
| | Async Scroll Restoration | ✅ | 🛑 | 🛑 | | ||
| | Router Invalidation | ✅ | ✅ | ✅ | | ||
| | Runtime Route Manipulation (Fog of War) | 🛑 | ✅ | ✅ | | ||
| | Parallel Routes | 🛑 | 🛑 | ✅ | | ||
| | -- | -- | -- | -- | | ||
| | **Full Stack** | -- | -- | -- | | ||
| | SSR | ✅ | ✅ | ✅ | | ||
| | Streaming SSR | ✅ | ✅ | ✅ | | ||
| | Generic RPCs | ✅ | 🛑 | 🛑 | | ||
| | Generic RPC Middleware | ✅ | 🛑 | 🛑 | | ||
| | React Server Functions | ✅ | 🛑 | ✅ | | ||
| | React Server Function Middleware | ✅ | 🛑 | 🛑 | | ||
| | API Routes | ✅ | ✅ | ✅ | | ||
| | API Middleware | ✅ | ✅ | ✅ | | ||
| | React Server Components | 🛑 | 🟡 (Experimental) | ✅ | | ||
| | `<Form>` API | 🛑 | ✅ | ✅ | | ||
|
|
||
| [bp-tanstack-router]: https://badgen.net/bundlephobia/minzip/@tanstack/react-router | ||
| [bpl-tanstack-router]: https://bundlephobia.com/result?p=@tanstack/react-router | ||
| [gh-tanstack-router]: https://github.com/tanstack/router | ||
| [stars-tanstack-router]: https://img.shields.io/github/stars/tanstack/router?label=%F0%9F%8C%9F | ||
| [_]: _ | ||
| [router]: https://github.com/remix-run/react-router | ||
| [bp-router]: https://badgen.net/bundlephobia/minzip/react-router | ||
| [gh-router]: https://github.com/remix-run/react-router | ||
| [stars-router]: https://img.shields.io/github/stars/remix-run/react-router?label=%F0%9F%8C%9F | ||
| [bpl-router]: https://bundlephobia.com/result?p=react-router | ||
| [bpl-history]: https://bundlephobia.com/result?p=history | ||
| [_]: _ | ||
| [nextjs]: https://nextjs.org/docs/routing/introduction | ||
| [bp-nextjs]: https://badgen.net/bundlephobia/minzip/next.js?label=All | ||
| [gh-nextjs]: https://github.com/vercel/next.js | ||
| [stars-nextjs]: https://img.shields.io/github/stars/vercel/next.js?label=%F0%9F%8C%9F | ||
| [bpl-nextjs]: https://bundlephobia.com/result?p=next | ||
|
Comment on lines
+80
to
+96
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove unused reference definitions. Several reference link definitions are defined but never used in the document. Remove the unused entries to clean up the file: [bp-tanstack-router]: https://badgen.net/bundlephobia/minzip/@tanstack/react-router
[bpl-tanstack-router]: https://bundlephobia.com/result?p=@tanstack/react-router
[gh-tanstack-router]: https://github.com/tanstack/router
[stars-tanstack-router]: https://img.shields.io/github/stars/tanstack/router?label=%F0%9F%8C%9F
-[_]: _
[router]: https://github.com/remix-run/react-router
[bp-router]: https://badgen.net/bundlephobia/minzip/react-router
[gh-router]: https://github.com/remix-run/react-router
[stars-router]: https://img.shields.io/github/stars/remix-run/react-router?label=%F0%9F%8C%9F
[bpl-router]: https://bundlephobia.com/result?p=react-router
-[bpl-history]: https://bundlephobia.com/result?p=history
-[_]: _
[nextjs]: https://nextjs.org/docs/routing/introduction
-[bp-nextjs]: https://badgen.net/bundlephobia/minzip/next.js?label=All
[gh-nextjs]: https://github.com/vercel/next.js
[stars-nextjs]: https://img.shields.io/github/stars/vercel/next.js?label=%F0%9F%8C%9F
-[bpl-nextjs]: https://bundlephobia.com/result?p=next🧰 Tools🪛 markdownlint-cli2 (0.18.1)84-84: Link and image reference definitions should be needed (MD053, link-image-reference-definitions) 90-90: Link and image reference definitions should be needed (MD053, link-image-reference-definitions) 91-91: Link and image reference definitions should be needed (MD053, link-image-reference-definitions) 93-93: Link and image reference definitions should be needed (MD053, link-image-reference-definitions) 96-96: Link and image reference definitions should be needed (MD053, link-image-reference-definitions) 🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix capitalization: "Github" → "GitHub".
The table header uses "Github" but the official branding is "GitHub".
📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[uncategorized] ~22-~22: The official name of this software platform is spelled with a capital “H”.
Context: ...----------------------------------- | | Github Repo / Stars ...
(GITHUB)
🪛 markdownlint-cli2 (0.18.1)
22-22: Images should have alternate text (alt text)
(MD045, no-alt-text)
22-22: Images should have alternate text (alt text)
(MD045, no-alt-text)
22-22: Images should have alternate text (alt text)
(MD045, no-alt-text)
🤖 Prompt for AI Agents