vuex README

The project's README from github.com/vuejs/vuex. As one markdown file: README.md.

Vuex

npm ci status


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

MIT

Copyright (c) 2015-present Evan You

vuex (vuejs/vuex)

Searching Database…

28.3K ·GitHub
What is this?Vuex is a state management pattern and library for Vue.js applications: one centralized store shared by all components, changed only in predictable ways.
Is Vuex a standalone tool, or a library I add to my Vue app?A library you plug into a Vue app, not a separate program. Every component reads from one shared store, and rules ensure state can only be mutated in a predictable fashion.
How do I add it to a project and where is the documentation?Install the vuex npm package in your Vue project and follow the guide at vuex.vuejs.org. The repo also ships runnable example applications under the examples directory.
Does Vuex need anything besides Vue itself to work?No. Its single runtime dependency is the @vue/devtools-api package, which powers the integration with Vue's official devtools extension.
The README says Pinia is the new default — what does that mean if I'm considering Vuex?Vuex is in maintenance mode: versions 3 and 4 are still maintained but unlikely to get new features. The team highly recommends Pinia for new projects, so Vuex mostly makes sense for existing apps.
What is Pinia, the recommended replacement?Vue's current official state management library. Its API is nearly identical to — or an enhancement of — what was planned for Vuex 5, so you can think of it as Vuex 5 under a different name, and it supports Vue 2.x as well.
What does the devtools integration actually give me?Zero-config time-travel debugging — you can step back through state changes — plus state snapshot export and import, all through Vue's official devtools extension.
Can I try it without wiring it into my own app first?Yes. The repository contains example applications under the examples directory, and npm run dev starts a local example server (node examples/server.js, port 8080).
I have an existing Vuex app — is moving to Pinia realistic?Yes, and there's no rush: Vuex and Pinia can be installed in the same project, which the README calls a suitable option for migrating an existing Vuex app to Pinia.
What are similar projects?formily, core, vue, nuxt, hyperapp, taro, zustand, relay
Creator
vuejs
Size
16.2 MB
Stars
28.3K
Age
11y
Commits · 90 Days