Description
Pinia is a store library for Vue that is intuitive, type safe, light and flexible. It uses the Composition API, and it has DevTools support so you can inspect your stores while you develop. Stores are modular by design: you create as many stores as you need, each in its own file, and import them wherever you need them. Calling defineStore returns a function that gives you access to the store. Pinia is extensible, so you can add behaviour through plugins, and it ships as a Nuxt module. The README says the current version works with Vue 3, and a separate v2 branch supports Vue 2. The library is MIT licensed and is published on GitHub, with a live demo on StackBlitz for Vue 3 and Nuxt 3. The FAQ says Pinia is the successor to Vuex, and it explains that dynamic modules are not type safe, so Pinia uses separate stores that can be imported anywhere instead. Installation is done with a package manager, and the docs cover installing the plugin, creating the root store, and Nuxt configuration. Sponsors can support the project through GitHub or a PayPal donation.…
Highlights
- Type-safe stores for Vue
- Composition API stores
- DevTools support
- Modular stores in separate files
- Nuxt module
- MIT licensed
Ratings & Reviews
No ratings yet
Be the first to rate pinia.
People also visit
pinia FAQ
What is Pinia?
A store library for Vue that uses the Composition API, with type safety, DevTools support and a small footprint.
Is Pinia the successor to Vuex?
Yes. The FAQ answers yes to that question.
Does it work with Vue 2?
The current version works with Vue 3. A v2 branch of the repository supports Vue 2.
Does it work with Nuxt?
Yes. Pinia ships as a Nuxt module, and the README links a Nuxt 3 demo on StackBlitz.
What about dynamic modules?
The FAQ says dynamic modules are not type safe, so Pinia asks you to create separate stores that you can import anywhere.
Is it free?
Yes. Pinia is MIT licensed.
What are the best pinia alternatives?
Popular alternatives to pinia include pinia-orm, Nuxt.js and Stan. See all pinia alternatives
















