TanStackRouter

現代且可擴展 的 React 和 Solid 應用程式路由方案

完全類型安全的路由器,內建數據獲取功能、過時重新驗證緩存和一流的搜索參數 API。

開始使用

類型安全且強大,但熟悉且簡單

TanStack Router 以其他工具所popularized的現代路由模式為基礎,但從頭開始重新設計,以實現 100% 類型安全,同時不犧牲開發者體驗。您確實可以兩全其美!

內建數據獲取與緩存

通過 TanStack Router 的 loader API 提升您的數據獲取並避免瀑布流,並獲得 內建緩存和自動預加載的即時頁面導航。需要更加自定義的解決方案?Router 的 API 設計可與您喜愛的客戶端緩存庫無縫協作!

讓您的狀態管理器嫉妒的搜索參數 API

TanStack Router 不會將您丟給 URLSearchParam 的狼群,而是為您提供狀態管理器級別的搜索參數 API。憑藉 模式、驗證、完全類型安全和預/後處理功能,您可以在 URL 中管理狀態,並輕鬆將其與您選擇的狀態管理器同步。

合作夥伴

Clerk
Clerk and TanStack are partnering to elevate your application's security and user experience with industry-leading authentication and user management. Paired with TanStack's no-nonsense routing and tooling, you'll be equipped to effortlessly deliver top-notch experiences that your users can trust and your developers can rely on.
Learn More
Convex
Official Deployment Partner
Netlify and TanStack have joined forces to provide developers with world-class deployment and hosting capabilities for modern web applications. Together we're focused on delivering an exceptional developer experience through seamless deployment workflows, edge functions, and serverless capabilities that help teams build and ship faster. Our partnership ensures TanStack applications can take full advantage of Netlify's powerful platform features.
Learn More
Neon
Neon and TanStack are joining forces to bring serverless PostgreSQL to the modern web stack. With Neon's blazing-fast branching, autoscaling, and storage/compute separation, developers can instantly spin up production-grade databases for every branch, test, or feature. TanStack's developer-first framework + Neon's cutting-edge infra = next-gen DX.
Learn More
Convex
Convex has teamed up with TanStack to not only deliver a first-class end-to-end type-safe database experience to TanStack developers, but to also ensure TanStack is ready for the real-time database arena. Convex's all-in-one platform delivers end-to-end type-safety via a revolutionary relational, real-time database and together, we're elevating what's possible with real-time React applications.
Learn More
Sentry
Sentry and TanStack are on a mission to make sure your apps are error-free and high-performers. Sentry's best-in-class error monitoring and performance insights combined with TanStack's cutting-edge libraries ensure that you can deliver the best possible experience to your users. Together, we're committed to making sure that you can build with confidence.
Learn More

功能豐富且輕量級

看看這些必備功能列表:

100% 類型安全 並行路由加載 一流的搜索參數 API 嵌套/佈局路由 輕量級 (12kb) Suspense + 過渡效果 嚴格導航 路徑自動完成 搜索參數模式 搜索參數驗證 搜索參數解析 + 序列化 搜索參數預/後處理 結構共享 自動預加載 非同步元素 待處理元素 錯誤邊界
開源專案上的廣告? 這是什麼,1999年嗎?
拜託... TanStack 是100%私人擁有,沒有付費產品、風險投資或併購計劃。我們是一個小團隊,致力於創建每天被數百萬人使用的軟件。你還期望什麼?
了解我們的理念 來瞭解我們如何計劃長期堅持下去(並保持相關性)。

親自試用!

創建路由,放置一個 Router,然後開始編寫代碼!

哇,您已經走了很長一段路!
只剩下一件事要做...
開始使用!