About vue-pinia-best-practices
A guide to Pinia practices, common pitfalls, and state-management patterns for Vue developers. It covers store setup, reactivity, and approaches to application state.
Key features
- 01Troubleshoot Pinia initialization errors
- 02Explain state requirements for setup stores
- 03Avoid reactivity loss from destructuring
- 04Handle store method call context
- 05Manage filter state through URLs
- 06Guide state patterns for large apps
Use cases
- 01Diagnose Pinia errors during startup
- 02Fix UI updates lost after store destructuring
- 03Preserve or share filters across refreshes
- 04Plan state management for large applications
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ vuejs-ai/ skills --skill vue-pinia-best-practicesAfter installing, type/vue-pinia-best-practicesin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
reference/pinia-no-active-pinia-error.mdpinia-setup-store-return-all-state.mdpinia-store-destructuring-breaks-reactivity.mdstate-url-for-ephemeral-filters.mdstate-use-pinia-for-large-apps.mdstore-method-binding-parentheses.mdDetails
From the project READMEPinia 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
Comments
Markdown supported