Vue State Management Store
pinia.vuejs.org
3
Leaving SiteNav
External Link Disclaimer
You are about to visit pinia.vuejs.org. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Pinia is the official state management library for Vue.js applications, designed as the spiritual successor to Vuex with a simpler API, full TypeScript support, and improved developer experience. The library organizes application state into modular stores, each containing reactive state, getter functions for computed values, and action methods for mutating logic. Unlike its predecessor, mutations are eliminated entirely, allowing developers to modify state directly within actions or even outside of them, reducing boilerplate and cognitive overhead. Stores are defined using a composable setup syntax that mirrors Vue component composition API patterns, making the mental model consistent across component and state layers. Each store is tree-shakeable, meaning unused stores are eliminated from production bundles. The entire library weighs approximately 1.5 kilobytes gzipped, adding negligible overhead to application payloads. Deep TypeScript inference provides autocompletion and type checking for state properties, getters, and action parameters without manual interface declarations. Integration with Vue DevTools is built in, offering a timeline of state changes, time-travel debugging, and hierarchical store inspection. Stores can be composed within other stores, enabling code reuse and separation of concerns without complex module nesting. Server-side rendering works through automatic hydration of store state, and plugins can extend functionality with persistence, synchronization, or custom middleware. The ecosystem includes community extensions for local storage persistence, IndexedDB integration, and form state handling.
Statistics
3
Views
0
Clicks
0
Like
0
Dislike