vue-pinia-best-practices
CommunityMaster Pinia patterns for robust Vue state.
Authorrunkids
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Pinia best practices help Vue 3 projects avoid common state management pitfalls such as exposing wrong state from setup stores, destructuring state which breaks reactivity, and misusing store references in templates.
Core Features & Use Cases
- Guidance on returning all state from setup stores to preserve SSR, DevTools visibility, and plugin compatibility.
- Reframing store usage with storeToRefs to maintain reactivity when destructuring.
- Patterns for correct template bindings, lazy store access, and consistent naming conventions.
Quick Start
Audit your Pinia stores and update setup stores to expose all state, getters, and actions; use storeToRefs for reactive state; avoid top-level store usage to keep patterns consistent across the codebase.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: vue-pinia-best-practices Download link: https://github.com/runkids/my-skills/archive/main.zip#vue-pinia-best-practices Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.