
Vuex
Centralized state store for Vue.js apps, now superseded by Pinia as the official default.
- Stars
- 28.3k
- Forks
- 9.4k
- Licence
- MIT
- Language
- JavaScript
- Last update
- 2.1 years ago
- Type
- Library
No commits in over a year — check for forks or alternatives before adopting.
What it is
Vuex is a state management library for Vue.js applications. It keeps shared application data in one central store that all components can read, and it enforces rules so changes to that data happen in a predictable way. It also integrates with Vue's devtools extension for features such as time-travel debugging and state snapshot export and import. The README notes that the official recommendation has changed: Pinia is now the default state management library for Vue, and Vuex 3 and 4 will still be maintained but are unlikely to get new features.
- Keep a shared user session or shopping cart state accessible across many Vue components
- Inspect and replay state changes with Vue devtools time-travel debugging
- Export and import state snapshots through the devtools extension
Great for
- Teams maintaining an existing Vue app that already uses Vuex
- Developers migrating an existing Vuex codebase gradually toward Pinia
- Projects that need a centralized store with devtools time-travel debugging
Not ideal for
- New Vue projects: the README says Pinia is the recommended choice for new projects
- Developers who want the newest state management features, since Vuex 3 and 4 are unlikely to receive new functionality
How to get it
- 1
Install with a package manager
You'll need: Node.js and npm (for running the examples)
Install dependencies to run the bundled examples
npm installServe the examples locally
npm run dev - 2
Run it
- Clone the repository from GitHub
- Run npm install in the project root
- Run npm run dev to serve the examples at localhost:8080
- Open the examples directory to read the sample applications
- 3
Get the most out of it
- Read the full documentation at vuex.vuejs.org for store, mutation, and action concepts
- Install Vue's official devtools extension to use time-travel debugging and snapshot export
- Study the example applications in the examples directory
- If starting a new project, consider Pinia instead, as the README recommends
Downloads
Strengths
- Official Vue state management library with a long history and a large star count
- Integrates with Vue's official devtools for time-travel debugging and snapshots
- Permissive MIT license
Trade-offs
- The README states Pinia is now the official default, so Vuex is no longer the recommended choice for new work
- Vuex 3 and 4 are maintained but unlikely to gain new features
- Setup details beyond the examples and documentation link are not covered in the README excerpt
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| vuex (this) | 28.3k | Library | intermediate | 2.1 years ago | Teams maintaining an existing Vue app that already uses Vuex |
| pinia | 14.8k | Library | beginner | 10 days ago | Vue 3 developers who need shared state across several components |
| redux | 61.4k | Library | intermediate | 16 days ago | Developers building larger front-end apps where many components share the same data |
| zustand | 58.9k | Library | beginner | 15 days ago | React developers who want simpler shared state than Redux |
| mobx | 28.2k | Library | intermediate | 5 days ago | Frontend developers building React apps with complex or frequently changing state |
| vue-admin-template | 20.4k | Library | intermediate | 2.5 years ago | Developers starting a new internal admin panel or back-office tool in Vue |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.