vue-routing

Configure Vue Router v4 patterns for Vue 3 applications.

9|1|Updated Jun 16, 2026
One-click install
npx skills add https://github.com/AratKruglik/antigravity-sdlc --skill vue-routing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vue-routing
Source: https://github.com/AratKruglik/antigravity-sdlc/tree/main/plugins/vue-plugin/skills/vue-routing
Command: npx skills add https://github.com/AratKruglik/antigravity-sdlc --skill vue-routing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Simplifies and stabilizes Vue Router v4 setups for Vue 3 apps by providing clear patterns for route creation, history mode, and navigation integration.

Core Features & Use Cases

  • Configuring routes with createRouter + createWebHistory for Vue 3 projects.
  • Using useRoute / useRouter and defining dynamic segments, nested routes, and route params.
  • Implementing auth guards via meta and beforeEach for protected views.
  • Lazy-loading route components to optimize code-splitting and performance.
  • Typing route params and leveraging typed navigation to reduce runtime errors.

Quick Start

Create a router using createRouter and createWebHistory and add routes for home and a dynamic user page.

Frequently Asked Questions about vue-routing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Vue Router with createRouter and createWebHistory in Vue 3?

Use createRouter and createWebHistory to initialize Vue Router in Vue 3 apps, defining route records and enabling history mode for clean URL navigation without hash fragments.

How do I implement navigation guards for protected routes in Vue 3?

Implement navigation guards for protected routes by defining meta fields on your routes and using the beforeEach hook to check auth conditions, ensuring consistent access control behavior across the application.

What is the best way to lazy load route components for code splitting in Vue Router?

The best way to lazy load route components in Vue Router is to use dynamic imports for your route definitions, which enables automatic code splitting and optimizes application performance by loading views on demand.

How do I type route params and use typed navigation with useRoute and useRouter?

Type route params by defining strongly typed route definitions, then access them safely inside the composition API using the useRoute and useRouter functions to reduce runtime navigation errors.

Does Vue Router v4 support nested routes and dynamic segments in Vue 3 applications?

Yes, Vue Router v4 fully supports configuring nested routes and dynamic segments in Vue 3 applications, allowing you to map complex UI structures to hierarchical URLs using the composition API.