When to use this skill
Use this skill whenever the user wants to:
- Configure routing, dynamic routes, guards, and lazy loading in a Vue project
- Use the Vue Router 4 (Vue 3) or 3.x (Vue 2) API
How to use this skill
- Configuration: createRouter, routes, history mode; router-link, router-view, useRouter.
- Advanced: dynamic routes, nested routes, beforeEach guards, meta; lazy loading component: () => import().
- Reference:https://router.vuejs.org/
Best Practices
- Handle routing and permissions centrally in guards; lazy-load large pages.
- Conventions for named routes and params/query; avoid storing sensitive data in routes.
Keywords
vue router, routing, guards, Vue 3, Vue 2