Vue Router Best Practices

Skill

Vue Router 4 best practices and gotchas: guards and lifecycle hooks not firing when only params change, no this in beforeRouteEnter, async calls and infinite redirect loops in guards, the deprecated next() callback, and cleaning up listeners after unmount.

vuejs-ai/skills · skills/vue-router-best-practices2.9k
Auf GitHub ansehen
README
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

Route Lifecycle

Setup