Files
school-developer/.cursor/rules/pinia-best-practices.mdc
吴红兵 1f645dad3e init
2025-12-02 10:37:49 +08:00

10 lines
319 B
Plaintext

---
description: Best practices for state management with Pinia
globs: src/stores/*.ts
alwaysApply: false
---
- Use Pinia stores for global state management
- Implement getters for computed state
- Use actions for side effects and asynchronous operations
- Utilize `defineStore` with `id` for better store organization