The intuitive store for Vue.js
open sourceMITfree
Pinia is a state management library (store) for Vue.js built on the Composition API, and the successor to Vuex. Stores are written as familiar as components, types are inferred so stores autocomplete even in JavaScript, it hooks into Vue devtools, and plugins react to store changes and actions to add transactions, local storage sync and the like. Stores are modular, so bundlers code-split them automatically, and the library weighs about 1.5 KB. It supports server-side rendering, with a Nuxt module (@pinia/nuxt).
Problems it solves
- share state between components in a Vue app
- a type-safe global store for Vue 3
- replace Vuex in my Vue project
- keep app state in sync with local storage in Vue
Features
- stores as familiar as components
- type inference and autocompletion
- Vue devtools support
- plugins
- modular, code-split stores
- about 1.5 KB
Capabilities
| Takes plugins | plan not known |
|---|
Alternatives
The same job
These do what Pinia does.
- Redux A JS library for predictable global state management