Tanstack Router

Use when setting up or using TanStack Router (@tanstack/react-router) in a Vite + React + TypeScript SPA — defining a route tree, end-to-end type-safe navigation, search-param validation, route loaders, code-splitting, preloading, authenticated routes, and the loader-to-TanStack-Query handshake. Produces a working file-based (or code-based) router: createRouter + RouterProvider + the Register augmentation, typed Link / useNavigate / useParams / useSearch, validateSearch, loaders with loaderDeps and deferred data, and a memory-history test harness for routed components. Covers file naming conventions, redirect guards, route masking, scroll restoration, head/meta, and notFound handling. Keywords: TanStack Router, type-safe routing, react router alternative, createFileRoute, search params, route loader, RouterProvider.

bm629 b26e643 7 files · 59.0 KB Updated

File contents

bm629/agent-skills/tree/main/skills/tanstack-router commit b26e643317

Frequently asked questions

npx skillmds@latest add bm629/tanstack-router