tanstack-vue-router-skilld
Installation
SKILL.md
@tanstack/vue-router
Type-safe router for Vue. Prepared source: version 1.170.35 (package.json:3).
- Requires
vue >= 3.3.0(peer), Node>= 20.19(package.json:59-88) - Runtime deps:
@tanstack/router-core@1.171.32,@tanstack/history@1.162.4,@tanstack/vue-store@^0.11.0 - ESM-only (
"type": "module"), nomain/CJS entry - Entry points:
@tanstack/vue-router,@tanstack/vue-router/ssr/server,@tanstack/vue-router/ssr/client(package.json:29-50)
Docs: https://tanstack.com/router (framework pages verified at /router/latest/docs/framework/vue/...)
Hard rules
- Most composables return
Ref<T>— use.valuein script; templates auto-unwrap.useRouter(),useNavigate(),useLinkProps(),useAwaited()do NOT return refs. Full table in references/composables.md. - Never cast or annotate inferred route/router types. Types come from the route tree and the
Registerdeclaration. - Register the router for type safety — without this,
Link/useNavigate/useSearchaccept any string: