hyf0 avatar

Vue Router Best Practices

This is a troubleshooting reference for the stuff that actually breaks in Vue Router 4. It covers the classic gotchas: navigation guards not firing when params change, the beforeRouteEnter this access trap, infinite redirect loops, and cleanup issues that cause memory leaks. Each pattern links to a specific problem and solution, from deprecated next() usage to async/await patterns in guards. If you've ever debugged why your component didn't refresh on a param change or why users got stuck in a redirect cycle, this has the answer. It's less about architecture and more about avoiding the pitfalls that waste half your afternoon.

skills.sh installs
2.5K
GitHub stars
2.7K
last updated
Jul 14, 2026

Install

$ npx -y skills add hyf0/vue-skills --skill vue-router-best-practices --agent claude-code

Installs into .claude/skills of the current project.

Files

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

Navigation Guards

Route Lifecycle

Sponsors

Details

Repository
github.com/hyf0/vue-skills
Category
Frontend Development
First seen
May 16, 2026

More from hyf0/vue-skills

All 11
1onmax avatarmotiononmax/nuxt-skillsUse when adding animations with Motion Vue (motion-v) - provides motion component API, gesture animations, scroll-linked effects, layout transitions, and compos2.3Kskills.sh installs
2sickn33 avatarui-ux-designersickn33/antigravity-awesome-skillsui ux designer2.3Kskills.sh installs
3asyrafhussin avatarlaravel-inertia-reactasyrafhussin/agent-skillsLaravel + Inertia.js + React integration patterns. Use when building Inertia page components, handling forms with useForm, managing shared data, or implementing2Kskills.sh installs
4getsentry avatarsentry-react-router-framework-sdkgetsentry/sentry-for-aiFull Sentry SDK setup for React Router Framework mode. Use when asked to "add Sentry to React Router Framework", "install @sentry/react-router", or configure er1.9Kskills.sh installs
5sickn33 avatarfrontend-designsickn33/antigravity-awesome-skillsfrontend design1.9Kskills.sh installs
6nexu-io avatarimagegen-frontend-mobilenexu-io/open-designElite mobile app image-generation skill for creating premium, app-native screen concepts and flows. Designed for iOS, Android, and cross-platform mobile product1.8Kskills.sh installs