developer-vuejs-routing-state

Configure Vue Router and Pinia with guards and lazy loading.

Updated Jan 6, 2026
One-click install
npx skills add https://github.com/cslsoftwares/ParamentersORM --skill developer-vuejs-routing-state
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: developer-vuejs-routing-state
Source: https://github.com/cslsoftwares/ParamentersORM/tree/main/.cursor/skills/developer-vuejs-routing-state_V1.0.0
Command: npx skills add https://github.com/cslsoftwares/ParamentersORM --skill developer-vuejs-routing-state

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill covers configuring Vue Router and Pinia to manage routing, authentication guards, and global state in Vue 3 apps, enabling scalable navigation and predictable state flows without coupling UI components to routing logic.

Core Features & Use Cases

  • Define routes with guards (beforeEach, beforeEnter, onBeforeRouteLeave).
  • Create domain-based Pinia stores with state, getters, actions, and reset.
  • Implement lazy loading for views to optimize bundle size.
  • Use case: large admin dashboard with protected routes and per-domain state management.

Quick Start

Create a Vue app, install vue-router and pinia, then configure router and stores as described.

Frequently Asked Questions about developer-vuejs-routing-state

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Vue Router with Pinia for state management in Vue 3?

Vue Router with Pinia uses route guards like beforeEach to check authentication state and redirect unauthorized users, enforcing secure access control across protected views without coupling logic to components.

What is the best way to structure Pinia stores for a large Vue admin dashboard?

The best way to structure Pinia stores for a large Vue dashboard is using domain-based stores with state, getters, actions, and reset capabilities, ensuring predictable state management across different application modules.

How do I implement lazy loading for Vue Router views to optimize bundle size?

Vue 3 applications require Vue Router and Pinia as dependencies to implement lazy-loaded views and resettable stores. You must configure these packages to establish route guards and domain-based state flows.

When should I use beforeEnter versus onBeforeRouteLeave guards in Vue Router?

Use beforeEnter guards to protect specific route entries and onBeforeRouteLeave to prevent users from navigating away with unsaved changes, ensuring strict authentication flows and navigation control within Vue Router.