Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Other skills

vue-router-best-practices

Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.

github.com/vuejs-ai · Static checks on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add vuejs-ai/skills --skill vue-router-best-practices

About this skill


name: vue-router-best-practices description: "Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions." version: 1.0.0 license: MIT author: github.com/vuejs-ai

Vue Router best practices, common gotchas, and navigation patterns.

Navigation Guards

  • Navigating between same route with different params → See router-beforeenter-no-param-trigger
  • Accessing component instance in beforeRouteEnter guard → See router-beforerouteenter-no-this
  • Navigation guard making API calls without awaiting → See router-guard-async-await-pattern
  • Users trapped in infinite redirect loops → See router-navigation-guard-infinite-loop
  • Navigation guard using deprecated next() function → See router-navigation-guard-next-deprecated

Route Lifecycle

  • Stale data when navigating between same route → See router-param-change-no-lifecycle
  • Event listeners persisting after component unmounts → See router-simple-routing-cleanup

Setup

  • Building production single-page application → See router-use-vue-router-for-production