Build type-safe, file-based React routing with TanStack Router. Supports client-side navigation, route loaders, and TanStack Query integration. Use when implementing file-based routing patterns, building SPAs with TypeScript routing, or troubleshooting devtools dependency errors, type safety issues, or Vite bundling problems.
Type-safe, file-based routing for React applications with Cloudflare Workers integration.
// src/routes/posts.$postId.tsx
import { createFileRoute } from '@tanstack/react-router'
export const Route = createFileRoute('/posts/$postId')({
loader: async ({ params }) => {
const post = await fetch(`/api/posts/${params.postId}`).then(r => r.json())
return { post }
},
component: function Post() {
const { post } = Route.useLoaderData()
return <h1>{post.title}</h1>
},
})
// Usage: Fully typed!
<Link to="/posts/$postId" params={{ postId: '123' }} />
| Metric | Without | With | Savings | |--------|---------|------|---------| | Tokens | 10k | 4k | 60% | | Time | 40-50min | 15-20min | 65% | | Errors | 3-4 | 0 | 100% |
npm install @tanstack/react-router @tanstack/router-devtools
npm install -D @tanstack/router-plugin
Latest: v1.134.13
Version: 1.0.0 | Last Updated: 2025-11-07
npx skills add ovachiever/TanStack 路由器下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer