
Pinia | The intuitive store for Vue.js
Pinia The intuitive store for Vue.js Type Safe, Extensible, and Modular by design. Forget you are even using a store.
Introduction | Pinia
The official course for Pinia is Mastering Pinia. Written by Pinia's author, it covers everything from the basics to advanced topics like plugins, testing, and server-side rendering.
Defining a Store | Pinia
You can define as many stores as you want and you should define each store in a different file to get the most out of Pinia (like automatically allowing your bundler to code split and providing TypeScript …
State | Pinia
You don't need to do much in order to make your state compatible with TS: make sure strict, or at the very least, noImplicitThis, is enabled and Pinia will infer the type of your state automatically!
Getting Started | Pinia
What is a Store? A Store (like Pinia) is an entity holding state and business logic that isn't bound to your Component tree. In other words, it hosts global state. It's a bit like a component that is always there …
Getters | Pinia
With setup() While Composition API is not for everyone, the setup() hook can make using Pinia easier to work with in the Options API. No extra map helper functions needed!
Plugins | Pinia
Plugins are added to the pinia instance with pinia.use(). The simplest example is adding a static property to all stores by returning an object:
简介 | Pinia
May 20, 2024 · 这是学习 Pinia 和掌握它的最佳方式。 为什么取名 Pinia? Pinia (发音为 /piːnjʌ/,类似英文中的 “peenya”) 是最接近有效包名 piña (西班牙语中的 pineapple,即“菠萝”) 的词。 菠萝花实际上 …
API Reference | Pinia
Intuitive, type safe, light and flexible Store for Vue
开始 | Pinia
May 20, 2024 · 在 Vue 2 中,Pinia 使用的是 Vuex 的现有接口 (因此不能与 Vuex 一起使用) 。 Store 是什么? Store (如 Pinia) 是一个保存状态和业务逻辑的实体,它并不与你的组件树绑定。 换句话说, …