router-core/path-params
Installation
SKILL.md
Path Params
Path params capture dynamic URL segments into named variables. They are defined with a $ prefix in the route path.
CRITICAL: Never interpolate params into the
tostring. Always use theparamsprop. This is the most common agent mistake for path params.
CRITICAL: Types are fully inferred. Never annotate the return of
useParams().
Dynamic Segments
A segment prefixed with $ captures text until the next /.
// src/routes/posts.$postId.tsx
import { createFileRoute } from '@tanstack/react-router'