Vue Router Practices

vuejs-ai/skills

Review Vue Router navigation, route parameters and component lifecycle patterns.

Contenuto aggiornato: SKILL.md
Punteggio di qualità 78/100
npx skills add vuejs-ai/skills --skill vue-router-best-practices
3331Stelle198ForkUltimo push del repository

Informazioni sullo Skill

Review Vue Router navigation, route parameters and component lifecycle patterns.

SKILL.md

Autore: vuejs-ai community · vuejs-ai/skills · MIT · SKILL.md @ 198f0cd

---
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)

Perché lo abbiamo scelto

A focused community guide with linked references.

A cosa serve

  • Review Vue Router navigation, route parameters and component lifecycle patterns.

Scope and limitations

A coding agent and a relevant Vue 3 or Nuxt project. This is an early community experiment; check examples against the installed framework versions and project conventions.

This is an unofficial community project; its README notes that guidance may contain omissions or hallucinations.

Prima di usarlo

  • A coding agent and a relevant Vue 3 or Nuxt project. This is an early community experiment; check examples against the installed framework versions and project conventions.

Fonti e riferimenti

Le fonti originali sono collegate qui sotto. Gli spunti pratici sono suggerimenti editoriali di SkillHey.