vue-router-best-practices
hyf0/vue-skills/skills/vue-router-best-practices/SKILL.md
Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.
Skill2.9k starsChanged 8 months ago
What's in it
- Navigation Guards
- Route Lifecycle
- Setup
--- 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](reference/router-beforeenter-no-param-trigger.md) - Accessing component instance in beforeRouteEnter guard → See [router-beforerouteenter-no-this](reference/router-beforerouteenter-no-this.md) - Navigation guard making API calls without awaiting → See [router-guard-async-await-pattern](reference/router-guard-async-await-pattern.md) - Users trapped in infinite redirect loops → See [router-navigation-guard-infinite-loop](reference/router-navigation-guard-infinite-loop.md) - Navigation guard using deprecated next() function → See [router-navigation-guard-next-deprecated](reference/router-navigation-guard-next-deprecated.md) ### Route Lifecycle - Stale data when navigating between same route → See [router-param-change-no-lifecycle](reference/router-param-change-no-lifecycle.md) - Event listeners persisting after component unmounts → See [router-simple-routing-cleanup](reference/router-simple-routing-cleanup.md) ### Setup - Building production single-page application → See [router-use-vue-router-for-production](reference/router-use-vue-router-for-production.md)
More agent context in hyf0/vue-skills
9 other files this repository gives its agents.
AGENTS.md
CLAUDE.md
Skill
- create-adaptable-composableskills/create-adaptable-composable/SKILL.md
- vue-best-practicesskills/vue-best-practices/SKILL.md
- vue-debug-guidesskills/vue-debug-guides/SKILL.md
- vue-jsx-best-practicesskills/vue-jsx-best-practices/SKILL.md
- vue-options-api-best-practicesskills/vue-options-api-best-practices/SKILL.md
- vue-pinia-best-practicesskills/vue-pinia-best-practices/SKILL.md
- vue-testing-best-practicesskills/vue-testing-best-practices/SKILL.md
Also found in 8 other repositories
The same file, byte for byte, in the weekly crawl of public GitHub.
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool registry_write, action report. How to connect one.

