Vue Pinia Best Practices
vuejs-ai/skills1.9k
This skill provides best practices, common pitfalls, and effective patterns for managing state with Pinia in Vue 3 applications. It covers store setup, reactivity, and state management techniques to help developers avoid issues and build scalable, maintainable applications. Ideal for Vue 3 developers seeking guidance on state management and effective store utilization using Pinia.
Pinia best practices, common gotchas, and state management patterns.
Store Setup
- Getting "getActivePinia was called" error at startup → See pinia-no-active-pinia-error
- Setup stores missing state in DevTools or SSR → See pinia-setup-store-return-all-state
Reactivity
- Store destructuring stops updating UI reactively → See pinia-store-destructuring-breaks-reactivity
- Store methods lose context in template calls → See store-method-binding-parentheses
State Patterns
- Filters reset on refresh or can't be shared → See state-url-for-ephemeral-filters
- Building production app without DevTools or conventions → See state-use-pinia-for-large-apps
GitHub Owner
Owner: vuejs-ai
Files
pinia-no-active-pinia-error
pinia-setup-store-return-all-state
pinia-store-destructuring-breaks-reactivity
store-method-binding-parentheses
state-url-for-ephemeral-filters
state-use-pinia-for-large-apps
SKILL.md
name: vue-pinia-best-practices description: "Pinia stores, state management patterns, store setup, and reactivity with stores." version: 1.0.0 license: MIT author: github.com/vuejs-ai
Pinia best practices, common gotchas, and state management patterns.
Store Setup
- Getting "getActivePinia was called" error at startup → See pinia-no-active-pinia-error
- Setup stores missing state in DevTools or SSR → See pinia-setup-store-return-all-state
Reactivity
- Store destructuring stops updating UI reactively → See pinia-store-destructuring-breaks-reactivity
- Store methods lose context in template calls → See store-method-binding-parentheses
State Patterns
- Filters reset on refresh or can't be shared → See state-url-for-ephemeral-filters
- Building production app without DevTools or conventions → See state-use-pinia-for-large-apps