web-routing-tanstack-router
Installation
SKILL.md
TanStack Router Patterns
Quick Guide: TanStack Router types the whole URL — path params, search params and loader return values all flow through inference, so a wrong
<Link to>is a compile error. The router plugin generatesrouteTree.gen.tsfrom the routes directory;validateSearchturns search params into a validated schema;beforeLoadruns sequentially for guards and context,loaderruns in parallel for data. Registering the router throughdeclare moduleis what makes the type safety app-wide.
Detailed Resources:
- examples/core.md — plugin setup, root route with context, entry point and registration, devtools
- examples/routes.md — file conventions in practice, nested and pathless layouts, non-nested routes, catch-all
- examples/navigation.md —
Link, active options, search updaters,useNavigate,redirect - examples/data-loading.md — loaders,
beforeLoad, prefetch, blocking vs non-blocking, SWR caching - examples/search-params.md — Zod validation, filter pages, search middleware, plain-function validation
- examples/auth-and-context.md — context injection, guard patterns, return-to redirect,
getRouteApi - examples/error-handling.md — error, pending and not-found components, code splitting, preloading
- reference.md — route options, loader context, hooks,
Linkprops, router options, file-naming table