SKILL.md
$2a
Composability
Topic
Description
Reference
Composables
Using Vue composables within stores (VueUse, etc.)
Composing Stores
Store-to-store communication, avoiding circular dependencies
Best Practices
Topic
Description
Reference
Testing
Unit testing with @pinia/testing, mocking, stubbing
Outside Components
Using stores in navigation guards, plugins, middlewares
best-practices-outside-component
Advanced
Topic
Description
Reference
SSR
Server-side rendering, state hydration
Nuxt
Nuxt integration, auto-imports, SSR best practices
HMR
Hot module replacement for development
Key Recommendations
- Prefer Setup Stores for complex logic, composables, and watchers
- **Use
storeToRefs()** when destructuring state/getters to preserve reactivity
- Actions can be destructured directly - they're bound to the store
- Call stores inside functions not at module scope, especially for SSR
- Add HMR support to each store for better development experience
- **Use
@pinia/testing** for component tests with mocked stores