TanStack Router Guide (React)
TanStack Router is a fully type-safe, file-based router for React. It provides first-class search param APIs, built-in data loading with SWR caching, automatic code splitting, and 100% inferred TypeScript types. Designed for client-first SPAs with optional SSR support.
Install
npm install @tanstack/react-router
npm install -D @tanstack/router-plugin
# Optional: devtools
npm install @tanstack/react-router-devtools
Quick Start with Vite (Recommended)
1. Configure Vite:
// vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { tanstackRouter } from '@tanstack/router-plugin/vite'
export default defineConfig({
plugins: [
tanstackRouter({ target: 'react', autoCodeSplitting: true }),
react(), // Must come AFTER tanstackRouter
],
})
2. Create root route:
// src/routes/__root.tsx
import { createRootRoute, Link, Outlet } from '@tanstack/react-router'
import { TanStackRouterDevtools } from '@tanstack/react-router-devtools'
export const Route = createRootRoute({
component: () => (
<>
<nav>
<Link to="/" activeProps={{ className: 'font-bold' }}>Home</Link>
<Link to="/about" activeProps={{ className: 'font-bold' }}>About</Link>
</nav>
<Outlet />
<TanStackRouterDevtools />
</>
),
})
3. Create routes:
// src/routes/index.tsx
import { createFileRoute } from '@tanstack/react-router'
export const Route = createFileRoute('/')({
component: () => <div>Welcome Home!</div>,
})
// src/routes/about.tsx
export const Route = createFileRoute('/about')({
component: () => <div>About Page</div>,
})
4. Mount the router:
// src/main.tsx
import { StrictMode } from 'react'
import ReactDOM from 'react-dom/client'
import { RouterProvider, createRouter } from '@tanstack/react-router'
import { routeTree } from './routeTree.gen'
const router = createRouter({ routeTree })
// Register router type globally for type safety
declare module '@tanstack/react-router' {
interface Register {
router: typeof router
}
}
ReactDOM.createRoot(document.getElementById('root')!).render(
<StrictMode>
<RouterProvider router={router} />
</StrictMode>,
)
File-Based Routing (Naming Conventions)
Routes live in src/routes/ and file names determine URL paths:
| File Name |
URL Path |
Purpose |
__root.tsx |
N/A |
Root layout (always rendered) |
index.tsx |
/ |
Index route |
about.tsx |
/about |
Static route |
posts.tsx |
/posts |
Layout route (renders Outlet) |
posts.index.tsx |
/posts |
Index for /posts |
posts.$postId.tsx |
/posts/:postId |
Dynamic segment |
_auth.tsx |
N/A |
Pathless layout (wraps children, no URL) |
_auth.dashboard.tsx |
/dashboard |
Child of pathless layout |
posts_.$postId.edit.tsx |
/posts/:postId/edit |
Non-nested (escapes parent layout) |
files.$.tsx |
/files/* |
Splat/catch-all route |
posts.{-$category}.tsx |
/posts/:category? |
Optional path parameter |
-utils.tsx |
N/A |
Excluded from routing |
(group)/login.tsx |
/login |
Route group (organizational only) |
The plugin auto-generates routeTree.gen.ts - commit this file but never edit it manually.
Navigation
import { Link, useNavigate } from '@tanstack/react-router'
// Declarative - Link component
<Link to="/posts/$postId" params={{ postId: '123' }}>View Post</Link>
<Link to="/posts" search={{ page: 2, sort: 'asc' }}>Page 2</Link>
<Link to=".." from="/posts/$postId">Back to Posts</Link>
// Active styling
<Link to="/about" activeProps={{ className: 'active' }} inactiveProps={{ className: 'dim' }}>
About
</Link>
// Programmatic - useNavigate
const navigate = useNavigate()
navigate({ to: '/posts/$postId', params: { postId: '123' } })
navigate({ to: '/posts', search: (prev) => ({ ...prev, page: 2 }) })
navigate({ to: '..', from: '/posts/$postId' }) // Relative
Search Params (Validated & Type-Safe)
import { createFileRoute } from '@tanstack/react-router'
import { z } from 'zod'
export const Route = createFileRoute('/posts')({
validateSearch: z.object({
page: z.number().catch(1),
sort: z.enum(['asc', 'desc']).optional(),
filter: z.string().optional(),
}),
component: PostsPage,
})
function PostsPage() {
const { page, sort, filter } = Route.useSearch() // Fully typed
const navigate = Route.useNavigate()
return (
<button => navigate({ search: (prev) => ({ ...prev, page: prev.page + 1 }) })}>
Next Page
</button>
)
}
Search Middlewares - retain or strip params across navigations:
import { retainSearchParams, stripSearchParams } from '@tanstack/react-router'
export const Route = createFileRoute('/posts')({
validateSearch: z.object({ page: z.number().catch(1), q: z.string().optional() }),
search: {
middlewares: [
retainSearchParams(['q']), // Keep 'q' across navigations
stripSearchParams({ page: 1 }), // Strip 'page' when it equals default
],
},
})
Data Loading
// Basic loader with path params
export const Route = createFileRoute('/posts/$postId')({
loader: async ({ params }) => {
const post = await fetchPost(params.postId)
return { post }
},
component: PostPage,
})
function PostPage() {
const { post } = Route.useLoaderData() // Fully typed
return <div>{post.title}</div>
}
// Loader with search-param dependencies
export const Route = createFileRoute('/posts')({
validateSearch: z.object({ page: z.number().catch(1) }),
loaderDeps: ({ search }) => ({ page: search.page }),
loader: async ({ deps }) => fetchPosts(deps.page),
component: PostsPage,
})
Key loader options: staleTime (SWR cache duration), shouldReload (control when to re-fetch), pendingMs/pendingMinMs (loading indicator timing), gcTime (garbage collection), loaderDeps (search-param keying).
Optional Path Parameters
Use {-$paramName} syntax for segments that may or may not exist:
// src/routes/posts.{-$category}.tsx -> /posts or /posts/tech
export const Route = createFileRoute('/posts/{-$category}')({
component: () => {
const { category } = Route.useParams() // category: string | undefined
return <div>{category ? `Posts in ${category}` : 'All Posts'}</div>
},
})
// Navigation: pass undefined to omit the segment
<Link to="/posts/{-$category}" params={{ category: undefined }}>All Posts</Link>
<Link to="/posts/{-$category}" params={{ category: 'tech' }}>Tech Posts</Link>
Router Context (Dependency Injection)
import { createRootRouteWithContext } from '@tanstack/react-router'
import type { QueryClient } from '@tanstack/react-query'
interface RouterContext {
queryClient: QueryClient
auth: AuthState
}
// Root route
const rootRoute = createRootRouteWithContext<RouterContext>()({
component: RootComponent,
})
// Use in any route
export const Route = createFileRoute('/posts')({
beforeLoad: ({ context }) => {
// context.queryClient and context.auth available here
},
loader: ({ context }) => context.queryClient.ensureQueryData(postsQueryOptions()),
})
// Provide context when creating router
const router = createRouter({
routeTree,
context: { queryClient, auth: { user: null } },
})
Authentication (Protected Routes)
// src/routes/_auth.tsx - Pathless layout for protected routes
export const Route = createFileRoute('/_auth')({
beforeLoad: async ({ context, location }) => {
if (!context.auth.user) {
throw redirect({
to: '/login',
search: { redirect: location.href },
})
}
},
component: () => <Outlet />,
})
// src/routes/_auth.dashboard.tsx - Protected route
export const Route = createFileRoute('/_auth/dashboard')({
component: () => <div>Protected Dashboard</div>,
})
Error Handling
import { notFound } from '@tanstack/react-router'
export const Route = createFileRoute('/posts/$postId')({
loader: async ({ params }) => {
const post = await fetchPost(params.postId)
if (!post) throw notFound()
return { post }
},
notFoundComponent: () => <div>Post not found!</div>,
errorComponent: ({ error, reset }) => (
<div>
<p>Error: {error.message}</p>
<button
</div>
),
})
// Global defaults on router
const router = createRouter({
routeTree,
defaultNotFoundComponent: () => <div>Page not found</div>,
defaultErrorComponent: ({ error }) => <div>Error: {error.message}</div>,
})
Essential Hooks
| Hook |
Purpose |
Route.useSearch() |
Current validated search params |
Route.useParams() |
Current path params |
Route.useLoaderData() |
Data from route loader |
Route.useRouteContext() |
Route's context |
Route.useNavigate() |
Navigate from current route |
useNavigate() |
Navigate from any component |
useRouter() |
Access router instance |
useRouterState() |
Reactive router state |
useMatch({ from: '/route' }) |
Match data for specific route |
useBlocker() |
Block navigation (dirty forms) |
See references/api-hooks.md for all 19 hooks with full signatures.
Key Rules
- Plugin order:
tanstackRouter() must come BEFORE react() in Vite config
- Commit routeTree.gen.ts: It's runtime code, not a build artifact
- Module declaration: Always register router type for global type inference
- Export as Route: File-based routes must export
const Route = createFileRoute(...)
- Pathless layouts: Prefix with
_ (e.g., _auth.tsx) for layout-only routes
- Non-nested routes: Use
_ suffix to escape parent layout (e.g., posts_.$id.edit.tsx)
- Ignore generated file: Add
routeTree.gen.ts to .prettierignore, .eslintignore
- Route matching order: Index > Static > Dynamic > Splat (automatic)
- Don't export route properties: Exported components/loaders break code splitting
- Validation adapters: Valibot/ArkType work directly; Zod needs
zodValidator adapter
- Outlet required: Every route with children must render
<Outlet />; routes without a component auto-render <Outlet />
- Type safety tip: Use
Route.useX() methods over standalone hooks for automatic type inference
Reference Files
API
references/api-hooks.md — All 19 hooks with signatures, options, and examples
references/api-components.md — Link, Outlet, Await, Block, HeadContent, CatchNotFound, and more
references/api-functions.md — createRouter, createFileRoute, redirect, notFound, linkOptions, search middleware
references/api-router-instance.md — Router instance methods, events, and route type API
references/api-types.md — NavigateOptions, RouterState, RouteMatch, type utilities, deprecated items
Patterns
references/patterns-params.md — Path parameters, search params (Zod/Valibot/ArkType), loaderDeps, middlewares
references/patterns-links-blocking.md — Link options, custom links, navigation blocking, history types
references/patterns-data.md — Data loading, mutations, TanStack Query integration, not-found handling
references/patterns-auth.md — Authentication, RBAC, router context, preloading strategies
Configuration
references/config-bundlers.md — Vite, Webpack, Rspack, esbuild, Router CLI setup and plugin options
references/config-routing.md — File naming conventions, route matching, code-based routing
references/config-virtual-routes.md — Virtual file routes, physical routes, __virtual.ts subtrees
references/config-router-options.md — All createRouter() options: core, preloading, data loading, search, scroll, URL behavior
references/config-route-options.md — All createFileRoute/createRoute options: components, search, loader, lifecycle, head, SSR
references/config-devtools.md — DevTools modes, production devtools, IDE configuration
Advanced
references/advanced-ssr.md — SSR streaming/non-streaming, dehydration/hydration, deferred data
references/advanced-code-splitting.md — Automatic/manual splitting, split groupings, lazy routes
references/advanced-url-features.md — URL rewrites, route masking, custom search serialization
references/advanced-optimization.md — Type safety, TS performance tips, render optimizations, view transitions
references/advanced-head-scroll.md — Document head management, scroll restoration, i18n
Operations
references/troubleshooting.md — FAQ, common errors, debugging guide, performance issues
references/deployment-integrations.md — Deployment (8 platforms), environment variables, framework integrations
references/testing-migration.md — Testing setup, route testing patterns, migration guides
1---2name: tanstack-router-guide3description: Type-safe, file-based router for React with first-class search params, data loading, and code splitting. Use when user asks to "create routes with TanStack Router", "set up file-based routing", "add search params", "use loaders", "protect routes with auth", "add code splitting", or asks about @tanstack/react-router, createFileRoute, createRouter, routeTree.gen.ts, useSearch, useParams, useNavigate, useBlocker, useMatch, useRouterState, beforeLoad, or route configuration. Do NOT use for TanStack Start server functions, Next.js App Router, React Router (without migration context), or Remix routing. Covers routing setup, navigation, search/path params, data loading, authentication, code splitting, SSR, error handling, testing, deployment, and bundler configuration (Vite, Webpack, Rspack, esbuild).4---56# TanStack Router Guide (React)78TanStack Router is a fully type-safe, file-based router for React. It provides first-class search param APIs, built-in data loading with SWR caching, automatic code splitting, and 100% inferred TypeScript types. Designed for client-first SPAs with optional SSR support.910## Install1112```sh13npm install @tanstack/react-router14npm install -D @tanstack/router-plugin15# Optional: devtools16npm install @tanstack/react-router-devtools17```1819## Quick Start with Vite (Recommended)2021**1. Configure Vite:**2223```ts24// vite.config.ts25import { defineConfig } from 'vite'26import react from '@vitejs/plugin-react'27import { tanstackRouter } from '@tanstack/router-plugin/vite'2829export default defineConfig({30 plugins: [31 tanstackRouter({ target: 'react', autoCodeSplitting: true }),32 react(), // Must come AFTER tanstackRouter33 ],34})35```3637**2. Create root route:**3839```tsx40// src/routes/__root.tsx41import { createRootRoute, Link, Outlet } from '@tanstack/react-router'42import { TanStackRouterDevtools } from '@tanstack/react-router-devtools'4344export const Route = createRootRoute({45 component: () => (46 <>47 <nav>48 <Link to="/" activeProps={{ className: 'font-bold' }}>Home</Link>49 <Link to="/about" activeProps={{ className: 'font-bold' }}>About</Link>50 </nav>51 <Outlet />52 <TanStackRouterDevtools />53 </>54 ),55})56```5758**3. Create routes:**5960```tsx61// src/routes/index.tsx62import { createFileRoute } from '@tanstack/react-router'6364export const Route = createFileRoute('/')({65 component: () => <div>Welcome Home!</div>,66})6768// src/routes/about.tsx69export const Route = createFileRoute('/about')({70 component: () => <div>About Page</div>,71})72```7374**4. Mount the router:**7576```tsx77// src/main.tsx78import { StrictMode } from 'react'79import ReactDOM from 'react-dom/client'80import { RouterProvider, createRouter } from '@tanstack/react-router'81import { routeTree } from './routeTree.gen'8283const router = createRouter({ routeTree })8485// Register router type globally for type safety86declare module '@tanstack/react-router' {87 interface Register {88 router: typeof router89 }90}9192ReactDOM.createRoot(document.getElementById('root')!).render(93 <StrictMode>94 <RouterProvider router={router} />95 </StrictMode>,96)97```9899## File-Based Routing (Naming Conventions)100101Routes live in `src/routes/` and file names determine URL paths:102103| File Name | URL Path | Purpose |104|-----------|----------|---------|105| `__root.tsx` | N/A | Root layout (always rendered) |106| `index.tsx` | `/` | Index route |107| `about.tsx` | `/about` | Static route |108| `posts.tsx` | `/posts` | Layout route (renders Outlet) |109| `posts.index.tsx` | `/posts` | Index for /posts |110| `posts.$postId.tsx` | `/posts/:postId` | Dynamic segment |111| `_auth.tsx` | N/A | Pathless layout (wraps children, no URL) |112| `_auth.dashboard.tsx` | `/dashboard` | Child of pathless layout |113| `posts_.$postId.edit.tsx` | `/posts/:postId/edit` | Non-nested (escapes parent layout) |114| `files.$.tsx` | `/files/*` | Splat/catch-all route |115| `posts.{-$category}.tsx` | `/posts/:category?` | Optional path parameter |116| `-utils.tsx` | N/A | Excluded from routing |117| `(group)/login.tsx` | `/login` | Route group (organizational only) |118119The plugin auto-generates `routeTree.gen.ts` - commit this file but never edit it manually.120121## Navigation122123```tsx124import { Link, useNavigate } from '@tanstack/react-router'125126// Declarative - Link component127<Link to="/posts/$postId" params={{ postId: '123' }}>View Post</Link>128<Link to="/posts" search={{ page: 2, sort: 'asc' }}>Page 2</Link>129<Link to=".." from="/posts/$postId">Back to Posts</Link>130131// Active styling132<Link to="/about" activeProps={{ className: 'active' }} inactiveProps={{ className: 'dim' }}>133 About134</Link>135136// Programmatic - useNavigate137const navigate = useNavigate()138navigate({ to: '/posts/$postId', params: { postId: '123' } })139navigate({ to: '/posts', search: (prev) => ({ ...prev, page: 2 }) })140navigate({ to: '..', from: '/posts/$postId' }) // Relative141```142143## Search Params (Validated & Type-Safe)144145```tsx146import { createFileRoute } from '@tanstack/react-router'147import { z } from 'zod'148149export const Route = createFileRoute('/posts')({150 validateSearch: z.object({151 page: z.number().catch(1),152 sort: z.enum(['asc', 'desc']).optional(),153 filter: z.string().optional(),154 }),155 component: PostsPage,156})157158function PostsPage() {159 const { page, sort, filter } = Route.useSearch() // Fully typed160 const navigate = Route.useNavigate()161162 return (163 <button onClick={() => navigate({ search: (prev) => ({ ...prev, page: prev.page + 1 }) })}>164 Next Page165 </button>166 )167}168```169170**Search Middlewares** - retain or strip params across navigations:171172```tsx173import { retainSearchParams, stripSearchParams } from '@tanstack/react-router'174175export const Route = createFileRoute('/posts')({176 validateSearch: z.object({ page: z.number().catch(1), q: z.string().optional() }),177 search: {178 middlewares: [179 retainSearchParams(['q']), // Keep 'q' across navigations180 stripSearchParams({ page: 1 }), // Strip 'page' when it equals default181 ],182 },183})184```185186## Data Loading187188```tsx189// Basic loader with path params190export const Route = createFileRoute('/posts/$postId')({191 loader: async ({ params }) => {192 const post = await fetchPost(params.postId)193 return { post }194 },195 component: PostPage,196})197198function PostPage() {199 const { post } = Route.useLoaderData() // Fully typed200 return <div>{post.title}</div>201}202```203204```tsx205// Loader with search-param dependencies206export const Route = createFileRoute('/posts')({207 validateSearch: z.object({ page: z.number().catch(1) }),208 loaderDeps: ({ search }) => ({ page: search.page }),209 loader: async ({ deps }) => fetchPosts(deps.page),210 component: PostsPage,211})212```213214**Key loader options:** `staleTime` (SWR cache duration), `shouldReload` (control when to re-fetch), `pendingMs`/`pendingMinMs` (loading indicator timing), `gcTime` (garbage collection), `loaderDeps` (search-param keying).215216## Optional Path Parameters217218Use `{-$paramName}` syntax for segments that may or may not exist:219220```tsx221// src/routes/posts.{-$category}.tsx -> /posts or /posts/tech222export const Route = createFileRoute('/posts/{-$category}')({223 component: () => {224 const { category } = Route.useParams() // category: string | undefined225 return <div>{category ? `Posts in ${category}` : 'All Posts'}</div>226 },227})228229// Navigation: pass undefined to omit the segment230<Link to="/posts/{-$category}" params={{ category: undefined }}>All Posts</Link>231<Link to="/posts/{-$category}" params={{ category: 'tech' }}>Tech Posts</Link>232```233234## Router Context (Dependency Injection)235236```tsx237import { createRootRouteWithContext } from '@tanstack/react-router'238import type { QueryClient } from '@tanstack/react-query'239240interface RouterContext {241 queryClient: QueryClient242 auth: AuthState243}244245// Root route246const rootRoute = createRootRouteWithContext<RouterContext>()({247 component: RootComponent,248})249250// Use in any route251export const Route = createFileRoute('/posts')({252 beforeLoad: ({ context }) => {253 // context.queryClient and context.auth available here254 },255 loader: ({ context }) => context.queryClient.ensureQueryData(postsQueryOptions()),256})257258// Provide context when creating router259const router = createRouter({260 routeTree,261 context: { queryClient, auth: { user: null } },262})263```264265## Authentication (Protected Routes)266267```tsx268// src/routes/_auth.tsx - Pathless layout for protected routes269export const Route = createFileRoute('/_auth')({270 beforeLoad: async ({ context, location }) => {271 if (!context.auth.user) {272 throw redirect({273 to: '/login',274 search: { redirect: location.href },275 })276 }277 },278 component: () => <Outlet />,279})280281// src/routes/_auth.dashboard.tsx - Protected route282export const Route = createFileRoute('/_auth/dashboard')({283 component: () => <div>Protected Dashboard</div>,284})285```286287## Error Handling288289```tsx290import { notFound } from '@tanstack/react-router'291292export const Route = createFileRoute('/posts/$postId')({293 loader: async ({ params }) => {294 const post = await fetchPost(params.postId)295 if (!post) throw notFound()296 return { post }297 },298 notFoundComponent: () => <div>Post not found!</div>,299 errorComponent: ({ error, reset }) => (300 <div>301 <p>Error: {error.message}</p>302 <button onClick={reset}>Retry</button>303 </div>304 ),305})306307// Global defaults on router308const router = createRouter({309 routeTree,310 defaultNotFoundComponent: () => <div>Page not found</div>,311 defaultErrorComponent: ({ error }) => <div>Error: {error.message}</div>,312})313```314315## Essential Hooks316317| Hook | Purpose |318|------|---------|319| `Route.useSearch()` | Current validated search params |320| `Route.useParams()` | Current path params |321| `Route.useLoaderData()` | Data from route loader |322| `Route.useRouteContext()` | Route's context |323| `Route.useNavigate()` | Navigate from current route |324| `useNavigate()` | Navigate from any component |325| `useRouter()` | Access router instance |326| `useRouterState()` | Reactive router state |327| `useMatch({ from: '/route' })` | Match data for specific route |328| `useBlocker()` | Block navigation (dirty forms) |329330See `references/api-hooks.md` for all 19 hooks with full signatures.331332## Key Rules333334- **Plugin order**: `tanstackRouter()` must come BEFORE `react()` in Vite config335- **Commit routeTree.gen.ts**: It's runtime code, not a build artifact336- **Module declaration**: Always register router type for global type inference337- **Export as Route**: File-based routes must export `const Route = createFileRoute(...)`338- **Pathless layouts**: Prefix with `_` (e.g., `_auth.tsx`) for layout-only routes339- **Non-nested routes**: Use `_` suffix to escape parent layout (e.g., `posts_.$id.edit.tsx`)340- **Ignore generated file**: Add `routeTree.gen.ts` to `.prettierignore`, `.eslintignore`341- **Route matching order**: Index > Static > Dynamic > Splat (automatic)342- **Don't export route properties**: Exported components/loaders break code splitting343- **Validation adapters**: Valibot/ArkType work directly; Zod needs `zodValidator` adapter344- **Outlet required**: Every route with children must render `<Outlet />`; routes without a `component` auto-render `<Outlet />`345- **Type safety tip**: Use `Route.useX()` methods over standalone hooks for automatic type inference346347## Reference Files348349### API350- `references/api-hooks.md` — All 19 hooks with signatures, options, and examples351- `references/api-components.md` — Link, Outlet, Await, Block, HeadContent, CatchNotFound, and more352- `references/api-functions.md` — createRouter, createFileRoute, redirect, notFound, linkOptions, search middleware353- `references/api-router-instance.md` — Router instance methods, events, and route type API354- `references/api-types.md` — NavigateOptions, RouterState, RouteMatch, type utilities, deprecated items355356### Patterns357- `references/patterns-params.md` — Path parameters, search params (Zod/Valibot/ArkType), loaderDeps, middlewares358- `references/patterns-links-blocking.md` — Link options, custom links, navigation blocking, history types359- `references/patterns-data.md` — Data loading, mutations, TanStack Query integration, not-found handling360- `references/patterns-auth.md` — Authentication, RBAC, router context, preloading strategies361362### Configuration363- `references/config-bundlers.md` — Vite, Webpack, Rspack, esbuild, Router CLI setup and plugin options364- `references/config-routing.md` — File naming conventions, route matching, code-based routing365- `references/config-virtual-routes.md` — Virtual file routes, physical routes, __virtual.ts subtrees366- `references/config-router-options.md` — All createRouter() options: core, preloading, data loading, search, scroll, URL behavior367- `references/config-route-options.md` — All createFileRoute/createRoute options: components, search, loader, lifecycle, head, SSR368- `references/config-devtools.md` — DevTools modes, production devtools, IDE configuration369370### Advanced371- `references/advanced-ssr.md` — SSR streaming/non-streaming, dehydration/hydration, deferred data372- `references/advanced-code-splitting.md` — Automatic/manual splitting, split groupings, lazy routes373- `references/advanced-url-features.md` — URL rewrites, route masking, custom search serialization374- `references/advanced-optimization.md` — Type safety, TS performance tips, render optimizations, view transitions375- `references/advanced-head-scroll.md` — Document head management, scroll restoration, i18n376377### Operations378- `references/troubleshooting.md` — FAQ, common errors, debugging guide, performance issues379- `references/deployment-integrations.md` — Deployment (8 platforms), environment variables, framework integrations380- `references/testing-migration.md` — Testing setup, route testing patterns, migration guides