pinia

仓库创建 2026年1月28日最近提交 1 个月前SkillHot 收录 22 天前
▸ 精选理由

易用且与 Vue 深度集成,适合中大型前端应用管理状态。

这个 Skill 做什么

Vue 的官方状态管理库,提供类型安全且可扩展的 store 方案。

提供 Vue 应用里的状态管理方案,写 store、state、getters 和 actions 时能直接用,TypeScript 支持好,调试体验也友好。需要把组件间状态抽离、实现全局状态或复杂业务逻辑时就采用。特点是轻量且类型安全,比老的方案更符合现代 Vue 开发习惯。

▸ 展开 SKILL.md 英文原文

Pinia official Vue state management library, type-safe and extensible. Use when defining stores, working with state/getters/actions, or implementing store patterns in Vue apps.

开发编程状态管理VueTypeScript通用
5.7k
Stars
313
Forks
19
仓库内 Skill
+188
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/antfu/skills/main/skills/pinia/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/antfu/skills/main/skills/pinia/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# Pinia

Pinia is the official state management library for Vue, designed to be intuitive and type-safe. It supports both Options API and Composition API styles, with first-class TypeScript support and devtools integration.

> The skill is based on Pinia v3.0.4, generated at 2026-01-28.

## Core References

| Topic | Description | Reference |
|-------|-------------|-----------|
| Stores | Defining stores, state, getters, actions, storeToRefs, subscriptions | [core-stores](references/core-stores.md) |

## Features

### Extensibility

| Topic | Description | Reference |
|-------|-------------|-----------|
| Plugins | Extend stores with custom properties, state, and behavior | [features-plugins
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有