vuex
Vuex is the formerly-official centralized state management library for Vue.js, providing a single store with predictable, mutation-controlled state and Vue devtools integration for time-travel debugging. It has been superseded by Pinia as Vue's recommended state solution and is now in maintenance mode.
MITPermissive — free to use in commercial and proprietary software, with attribution.View license →
Production readiness
4/5- Actively maintainedNo commits in over a year
- No known vulnerabilitiesNo OSV advisories
- Clear, usable licenseMIT (permissive)
- Proven adoptionWidely used
- Has documentationDocumentation indexed
npm install vuexOur analysis
Vuex is a Flux-inspired state management pattern and library for Vue.js, centralizing application state in a single store where mutations are the only way to change state, ensuring predictable, traceable updates.
When to use vuex
Use Vuex when maintaining an existing large Vue 2 or Vue 3 application already built on it, or when you specifically need the strict mutation/action discipline and an established ecosystem. It remains a stable, well-understood choice for legacy codebases.
When not to
Avoid Vuex for new projects — the Vue team now recommends Pinia, which offers a lighter, more TypeScript-friendly API without the mutation boilerplate. For non-Vue apps, frameworks like Redux or Zustand are the natural fit.
Strengths
- First-class integration with Vue devtools including time-travel debugging and state snapshots
- Mature, battle-tested, and extensively documented with a huge community
- Enforces a predictable, single-source-of-truth architecture that scales for large apps
- Officially maintained for Vuex 3 (Vue 2) and Vuex 4 (Vue 3)
Trade-offs
- Officially deprecated in favor of Pinia — no new features will be added
- Verbose boilerplate (state, getters, mutations, actions, modules) compared to modern alternatives
- Weak TypeScript ergonomics, especially around typed state and mutations
- Single global store with namespaced modules can feel heavy for smaller apps
Maturity
Highly mature and production-proven but effectively in maintenance-only mode. The Vue team has designated Pinia as the successor (essentially Vuex 5), so Vuex 3/4 will receive bug fixes but no further functionality. New projects should migrate to or start with Pinia.
Vuex
Pinia is now the new default
The official state management library for Vue has changed to Pinia. Pinia has almost the exact same or enhanced API as Vuex 5, described in Vuex 5 RFC. You could simply consider Pinia as Vuex 5 with a different name. Pinia also works with Vue 2.x as well.
Vuex 3 and 4 will still be maintained. However, it's unlikely to add new functionalities to it. Vuex and Pinia can be installed in the same project. If you're migrating existing Vuex app to Pinia, it might be a suitable option. However, if you're planning to start a new project, we highly recommend using Pinia instead.
Vuex is a state management pattern + library for Vue.js applications. It serves as a centralized store for all the components in an application, with rules ensuring that the state can only be mutated in a predictable fashion. It also integrates with Vue's official devtools extension to provide advanced features such as zero-config time-travel debugging and state snapshot export / import.
Learn more about Vuex at "What is Vuex?", or get started by looking into full documentation.
Documentation
To check out docs, visit vuex.vuejs.org.
Examples
You may find example applications built with Vuex under the examples directory.
Running the examples:
$ npm install
$ npm run dev # serve examples at localhost:8080
Questions
For questions and support please use the Discord chat server or the official forum. The issue list of this repo is exclusively for bug reports and feature requests.
Issues
Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.
Changelog
Detailed changes for each release are documented in the release notes.
Stay In Touch
For latest releases and announcements, follow on Twitter: @vuejs.
Contribution
Please make sure to read the Contributing Guide before making a pull request.
License
Copyright (c) 2015-present Evan You