V
vue-pinia-best-practices
by @vuejs-aiv
4.5(148)
掌握Pinia状态管理库的最佳实践,包括存储设置、状态管理模式及相关推荐用法。
安装方式
npx skills add vuejs-ai/skills --skill vue-pinia-best-practicescompare_arrows
Before / After 效果对比
1 组使用前
传统Vue状态管理复杂,代码冗余,难以维护和扩展。团队协作时,状态管理不规范导致问题频发,影响项目进度。
使用后
采用Pinia最佳实践,简化状态存储设置,提升代码可读性和可维护性。确保状态响应性,加速开发进程,构建更健壮的前端应用。
SKILL.md
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
用户评价 (0)
发表评价
效果
易用性
文档
兼容性
暂无评价
统计数据
安装量7.9K
评分4.5 / 5.0
版本
更新日期2026年5月22日
对比案例1 组
用户评分
4.5(148)
5
24%
4
51%
3
24%
2
2%
1
0%
为此 Skill 评分
0.0
兼容平台
🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI
时间线
创建2026年3月16日
最后更新2026年5月22日