> vue-router-best-practices
Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.
fetch
$
curl "https://skillshub.wtf/vuejs-ai/skills/vue-router-best-practices?format=md"SKILL.md•vue-router-best-practices
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
> related_skills --same-repo
> vue-testing-best-practices
Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.
> vue-pinia-best-practices
Pinia stores, state management patterns, store setup, and reactivity with stores.
> vue-options-api-best-practices
Vue 3 Options API style (data(), methods, this context). Each reference shows Options API solution only.
> vue-jsx-best-practices
JSX syntax in Vue (e.g., class vs className, JSX plugin config).
┌ stats
installs/wk0
░░░░░░░░░░github stars1.9K
██████████first seenMar 17, 2026
└────────────