Skip to content

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
Step-by-step guide: how to use VuexInstall, first run, examples, tips and FAQs

How to get it

  1. 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 install

    Serve the examples locally

    npm run dev
  2. 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. 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

ProjectStarsTypeLevelUpdatedBest for
vuex (this)28.3kLibraryintermediate2.1 years agoTeams maintaining an existing Vue app that already uses Vuex
pinia14.8kLibrarybeginner10 days agoVue 3 developers who need shared state across several components
redux61.4kLibraryintermediate17 days agoDevelopers building larger front-end apps where many components share the same data
zustand58.9kLibrarybeginner15 days agoReact developers who want simpler shared state than Redux
mobx28.2kLibraryintermediate5 days agoFrontend developers building React apps with complex or frequently changing state
vue-admin-template20.4kLibraryintermediate2.5 years agoDevelopers 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.