All skills
skilld-dev avatar

/tanstack-vue-router-skilld

@b9c39cb

Use when writing, debugging, or refactoring code that imports @tanstack/vue-router (TanStack Router for Vue). Covers setup, file-based and code-based routes, composables returning Ref, Link, loaders, search params, SSR, and v1.170.x deprecations.

Use this Skill: https://skilld.dev/gh/skilld-dev/vue-ecosystem-skills/tanstack-vue-router-skilld

This session only. Nothing lands on disk.

referencesapi-surface.md

≈967 tokens on demand. Your agent reads this file only when SKILL.md points to it.

API surface

Every public export of @tanstack/vue-router 1.170.35, from src/index.tsx. Re-exported router-core and history APIs are marked.

Router and route factories

  • createRouter(options) → router instance (src/router.ts:77-79)
  • createRoute(options), createRootRoute(options), createRootRouteWithContext<TContext>() (src/route.ts:282, src/route.ts:601, src/route.ts:376)
  • createFileRoute(path), createLazyRoute(id), createLazyFileRoute(path) (src/fileRoute.ts:38-54, src/index.tsx:128-134)
  • createRouteMask(opts), getRouteApi(id) (src/route.ts:511, src/route.ts:83)
  • Deprecated classes still exported: Router, Route, RootRoute, RouteApi, NotFoundRoute, FileRoute, LazyRoute, FileRouteLoader

Components

RouterProvider, RouterContextProvider, Link, MatchRoute, Match, Outlet, Navigate, Await, Block, CatchBoundary, ErrorComponent, CatchNotFound, DefaultGlobalNotFound, ScrollRestoration (deprecated), HeadContent, Scripts, ScriptOnce, Body, Html, Asset, ClientOnly, Matches (internal render tree root).

Composables

useRouter, useRouterState, useNavigate, useMatchRoute, useMatches, useParentMatches, useChildMatches, useMatch, useSearch, useParams, useLoaderData, useLoaderDeps, useRouteContext, useLocation, useLinkProps, useBlocker, useCanGoBack, useAwaited, useElementScrollRestoration, useTags.

Link utilities

  • createLink(Comp) — wraps a Vue component so it renders like Link (src/link.tsx:846-856)
  • linkOptions(options) — identity function that validates link option objects at definition time (src/link.tsx:967-969)
  • lazyRouteComponent(importer, exportName?, ssr?) — lazy component with preload and one-shot reload on stale module errors after deploy (src/lazyRouteComponent.tsx:23-156)

Router-core re-exports

defer, redirect, isRedirect, notFound, isNotFound, isMatch, retainSearchParams, stripSearchParams, createSerializationAdapter, defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith, functionalUpdate, replaceEqualDeep, deepEqual, createControlledPromise, lazyFn, SearchParamError, createRouterConfig, composeRewrites, DEFAULT_PROTOCOL_ALLOWLIST, path utilities (joinPaths, cleanPath, trimPath*, resolvePath, interpolatePath).

History re-exports (from @tanstack/history)

createHistory, createBrowserHistory, createHashHistory, createMemoryHistory; types RouterHistory, HistoryLocation, ParsedPath, HistoryState, BlockerFn.

Key types

Register, RegisteredRouter, RouterOptions, RouterState, RouteOptions, FileBaseRouteOptions, UpdatableRouteOptions, RouteConstraints, AnyRoute, AnyRouter, RouteMatch, MakeRouteMatch, LinkOptions, LinkProps, ActiveLinkOptions, NavigateOptions, ToOptions, Redirect, NotFoundError, ErrorComponentProps, NotFoundRouteProps, ParsedLocation, SearchSchemaInput, ValidatorAdapter, FileRoutesByPath, RouteById, CreateFileRoute, ViewTransitionOptions (via RouterOptions), VueNode, SyncRouteComponent, AsyncRouteComponent, RouteComponent, ErrorRouteComponent, NotFoundRouteComponent, LocationRewrite, LocationRewriteFunction.

Framework-shared type docs: https://tanstack.com/router/latest/docs/framework/vue/api/router/RouterOptionsType

Subpath exports

  • @tanstack/vue-router/ssr/server: RouterServer, defaultRenderHandler, defaultStreamHandler, renderRouterToStream, renderRouterToString (src/ssr/server.ts:1-6)
  • @tanstack/vue-router/ssr/client: RouterClient (src/ssr/client.ts:1)
  • @tanstack/vue-router/package.json

A development export condition serves dist/esm/index.dev.js for dev bundles (package.json:29-36).

Source: SKILL.md on GitHub

1 warning8d3 checks · Risk SAFE
  • Gen Agent Trust Hub8d

    The skill is a comprehensive collection of documentation, API references, and guides for the TanStack Router library. It provides technical information and best practices for implementing routing in web applications. No malicious code, prompt injections, or data exfiltration patterns were detected.

  • Socket8d

    No alerts

  • Snyk8d

    Risk: MEDIUM · 1 issue

Signed by skilld at b9c39cb. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated last week

README badge

README badge for skilld-dev/vue-ecosystem-skills/tanstack-vue-router-skilld