state management for Vue.js
Last release 4 years ago
no release in 18 months
Release timing varies
gaps range from 3 weeks to 1.3 years
Some releases are documented
notes for 20 of 47 stable releases
1 version withdrawn
withdrawn after publishing
11 years old
62 releases · first in 2015
Release timeline
62 releases since 2015One column per quarter.
Releases
- 4.1.014 Oct 2022
Release notes
Open source →Vue Core Version Requirement Change
This release contains an important fix (#1883) that relies on the
effectScopeAPI from Vue core, which is only available in Vue 3.2+.Bug Fixes
- build: node deprecated warning in export module (#2048) (397e9fb)
- getters being destroyed on component destroy (#1878) (#1883) (b2f851f)
4.0.2 (2021-06-17)
Bug Fixes
- devtools: fix no getters displayed on root module + better getters inspector (#1986) (bc20295)
- build: cjs build failing due to
__VUE_PROD_DEVTOOLS__defined (#1991) (#1992) (7151622)
4.0.1 (2021-05-24)
Features
- dx: add devtools integration (#1949)
- 4.0.217 Jun 2021
- 4.0.124 May 2021
- 4.0.02 Feb 2021
Release notes2 sources agree
Open source →This is the official Vuex 4 release.
The focus for Vuex 4 is compatibility. Vuex 4 supports Vue 3, and it provides the exact same API as Vuex 3, so users can reuse their existing Vuex code with Vue 3.
There are a few breaking changes described in a later section, so please check them out.
You can find basic usage with both Option and Composition API in the
exampledirectory.It's still released under
nexttag in NPM package as same as Vue 3. We're planning to removenexttag once Vue 3 is ready to remove it.There have been a lot of contribution to make Vuex 4 stable. Thank you all for your very much appreciated help. It wouldn't have been possible without this wonderful Vue community!
Documentation
To check out docs, visit next.vuex.vuejs.org.
Breaking changes
Installation process has changed
To align with the new Vue 3 initialization process, the installation process of Vuex has changed.
To create a new store instance, users are now encouraged to use the newly introduced
createStorefunction.import { createStore } from 'vuex' export const store = createStore({ state() { return { count: 1 } } })
Whilst this is not technically a breaking change, you may still use the
new Store(...)syntax, we recommend this approach to align with Vue 3 and Vue Router 4.To install Vuex to a Vue instance, pass the store instance instead of Vuex.
import { createApp } from 'vue' import { store } from './store' import App from './App.vue' const app = createApp(App) app.use(store) app.mount('#app')
Bundles are now aligned with Vue 3
The following bundles are generated to align with Vue 3 bundles:
vuex.global(.prod).js- For direct use with
<script src="...">in the browser. Exposes the Vuex global. - Global build is built as IIFE, and not UMD, and is only meant for direct use with
<script src="...">. - Contains hard-coded prod/dev branches and the prod build is pre-minified. Use the
.prod.jsfiles for production.
- For direct use with
vuex.esm-browser(.prod).js- For use with native ES module imports (including module supporting browsers via
<script type="module">.
- For use with native ES module imports (including module supporting browsers via
vuex.esm-bundler.js- For use with bundlers such as
webpack,rollupandparcel. - Leaves prod/dev branches with
process.env.NODE_ENVguards (must be replaced by bundler). - Does not ship minified builds (to be done together with the rest of the code after bundling).
- For use with bundlers such as
vuex.cjs.js- For use in Node.js server-side rendering with
require().
- For use in Node.js server-side rendering with
Typings for
ComponentCustomPropertiesVuex 4 removes its global typings for
this.$storewithin Vue Component to solve issue #994. When used with TypeScript, you must declare your own module augmentation.Place the following code in your project to allow
this.$storeto be typed correctly:// vuex-shim.d.ts import { ComponentCustomProperties } from 'vue' import { Store } from 'vuex' declare module '@vue/runtime-core' { // Declare your own store states. interface State { count: number } interface ComponentCustomProperties { $store: Store<State> } }
createLoggerfunction is exported from the core moduleIn Vuex 3,
createLoggerfunction was exported fromvuex/dist/loggerbut it's now included in the core package. You should import the function directly fromvuexpackage.import { createLogger } from 'vuex'
Bug Fixes Included Since 4.0.0-rc.2
- 4.0.0-rc.225 Nov 2020pre-release
- 4.0.0-rc.130 Oct 2020pre-release
Release notes
Open source →Bug Fixes
- fix getters getting re-evaluated on every access (#1823) (#1860) (0006765)
- types: add lost argument of useStore (#1803) (657afe3)
Features
- 4.0.0-beta.429 Jun 2020pre-release
- 4.0.0-beta.329 Jun 2020pre-release
- 4.0.0-beta.211 May 2020pre-release
Release notes
Open source → - 4.0.0-beta.125 Apr 2020pre-release
Release notes
Open source →Features
- Added TypeScript support.
Breaking Changes
Bundles are now aligned with Vue 3
The bundles are generated as below to align with Vue 3 bundles.
vuex.global(.prod).js- For direct use via
<script src="...">in the browser. Exposes the Vuex global. - Note that global builds are not UMD builds. They are built as IIFEs and is only meant for direct use via
<script src="...">. - Contains hard-coded prod/dev branches, and the prod build is pre-minified. Use the
.prod.jsfiles for production.
- For direct use via
vuex.esm-browser(.prod).js- For usage via native ES modules imports (in browser via
<script type="module">.
- For usage via native ES modules imports (in browser via
vuex.esm-bundler.js- For use with bundlers like
webpack,rollupandparcel. - Leaves prod/dev branches with
process.env.NODE_ENVguards (must be replaced by bundler). - Does not ship minified builds (to be done together with the rest of the code after bundling).
- For use with bundlers like
vuex.cjs.js- For use in Node.js server-side rendering via
require().
- For use in Node.js server-side rendering via
Typings for
ComponentCustomPropertiesVuex 4 removes its global typings for
this.$storewithin Vue Component due to solving issue #994. When using TypeScript, you must provide your own augment declaration.Please place the following code in your project to have
this.$storeworking.// vuex-shim.d.ts declare module "@vue/runtime-core" { // Declare your own store states. interface State { count: number } interface ComponentCustomProperties { $store: Store<State>; } } - 4.0.0-alpha.115 Mar 2020pre-release
Release notes
Open source →This is the Vue 3 compatible version of Vuex. The focus is compatibility, and it provides the exact same API as Vuex 3, so users can reuse their existing Vuex code for Vue 3.
Status: Alpha
All Vuex 3 feature works. There are a few breaking changes described in a later section, so please check them out. You can find basic usage with both option and composition API at
examplefolder.Please note that it's still unstable, and there might be bugs. Please provide us feedback if you find anything. You may use vue-next-webpack-preview to test out Vue 3 with Vuex 4.
Breaking changes
Installation process has changed
To align with the new Vue 3 initialization process, the installation process of Vuex has changed as well.
You should use a new
createStorefunction to create a new store instance.import { createStore } from 'vuex' const store = createStore({ state () { return { count: 1 } } })This is technically not a breaking change because you could still use
new Store(...)syntax. However, to align with Vue 3 and also with Vue Router Next, we recommend users to usecreateStorefunction instead.Then to install Vuex to Vue app instance, pass the store instance instead of Vuex.
import { createApp } from 'vue' import store from './store' import App from './APP.vue' const app = createApp(Counter) app.use(store) app.mount('#app')Kown issues
- The code is kept as close to Vuex 3 code base as possible, and there're plenty of places where we should refactor. However, we are waiting for all of the test cases to pass before doing so (some tests require Vue 3 update).
- TypeScript support is not ready yet. Please use JS environment to test this for now.
- 3.6.226 Jan 2021
- 3.6.126 Jan 2021
Release notes
Open source → - 3.6.025 Nov 2020
- 3.5.129 Jun 2020
Nothing published for this version
- 3.5.029 Jun 2020
Nothing published for this version
- 3.4.011 May 2020
- 3.3.025 Apr 2020
Release notes
Open source →Bug Fixes
- Prepend devtool handler (#1358) (a39d076), closes vuejs/vue-devtools#678
- types: Add
devtoolsto store options type (#1478) (38c11dc)
Features
- 3.2.019 Apr 2020
Release notes
Open source →Features
3.1.3 (2020-03-09)
Bug Fixes
3.1.2 (2019-11-10)
Bug Fixes
- tweak mapping helper warning message (#1641) (e60bc76)
- types: avoid broadening vue instance type when using map helpers (#1639) (9a96720)
- add warnings when the different namespaced modules has the same names… (#1554) (91f3e69)
- Should vuex mapState print error message #1093 (#1297) (e5ca2d5)
- Warn about conflicts between state and module (#1365) (538ee58)
- docs: Clearify state object type (#1601) (de06f76)
Performance Improvements
3.1.1 (2019-05-08)
Bug Fixes
- Memory leak happening while using registerModule/u… (#1508) (cb9986a), closes issue#1507
- types: Make mutation and action payload optional in definition file (#1517) (0e109e2), closes #1491
Features
- 3.1.39 Mar 2020
Nothing published for this version
- 3.1.210 Nov 2019
Nothing published for this version
- 3.1.18 May 2019
Nothing published for this version
- 3.1.017 Jan 2019
Release notes
Open source →Bug Fixes
- types: add helpers to default export type declaration as in sources (#1408) (404d0de)
- types: add type annotation for the context of actions (#1322) (d1b5c66)
- types: allow a function type for root
stateoption (#1132) (d39791b) - Add key to v-for (#1369) (a9bd047)
- avoid to call root state function twice (#1034) (86677eb)
- fix #1032, relax vue typing in helpers (#1044) (7c7ed1d)
Features
- add ability to turn off devtools on vuex by passing an off options (#1407) (be75d41)
- ensure errors in action subscribers do not break actions (acd7249)
Reverts
3.0.1 (2017-11-01)
- 3.0.11 Nov 2017
Nothing published for this version
- 3.0.011 Oct 2017
Release notes
Open source →Features
BREAKING CHANGES
-
typings: It is no longer compatible with the old Vue typings
-
chore(package): bump typescript and vue core typings
-
chore: bump vue
-
Update package.json
-
- 2.5.011 Oct 2017
Release notes
Open source →Bug Fixes
Features
- add logger plugin logger config support (#771) (804c3bb)
- preserve state with registerModule (#837) (4c1841e)
- root actions in namespaced modules (#941) (73189eb)
- subscribeAction (#960) (a8326b1)
2.4.1 (2017-09-27)
Bug Fixes
- allow installation on extended Vue copies (c87b72f)
- link to details of mutations in components (#930) (e82782b)
- move auto installation code into the store constructor (#914) (852ac43)
Features
- 2.4.127 Sept 2017
Nothing published for this version
- 2.4.029 Aug 2017
Release notes
Open source →Bug Fixes
- typings: watch() returns an unwatch function (#922) (a4bd081)
- add missing typings and docs of createNamespacedHelpers (#910) (7ad573b)
Features
Performance Improvements
- 2.3.118 Apr 2017
Nothing published for this version
- 2.3.013 Apr 2017
Release notes
Open source →BREAKING CHANGES
- It's no longer allowed to omit the '-loader' suffix when using loaders. You need to specify 'babel-loader' instead of 'babel'. My version of webpack: 2.2.0-rc.3 Adding the '-loader' suffix fixed the problem. Not sure though how safe it is to use 'babel-loader' instead of 'babel' with previous webpack versions...
2.2.1 (2017-02-26)
- 2.2.126 Feb 2017
Nothing published for this version
- 2.2.026 Feb 2017
- 2.1.324 Feb 2017
Nothing published for this version
- 2.1.26 Feb 2017
Nothing published for this version
- 2.1.117 Dec 2016
Nothing published for this version
- 2.1.016 Dec 2016
Nothing published for this version
- 2.0.030 Sept 2016
Nothing published for this version
- 2.0.0-rc.624 Sept 2016pre-release
Nothing published for this version
- 2.0.0-rc.515 Aug 2016pre-release
Nothing published for this version
- 2.0.0-rc.45 Aug 2016pre-release
Nothing published for this version
- 2.0.0-rc.311 Jul 2016pre-release
Nothing published for this version
- 2.0.0-rc.15 Jul 2016pre-release
Nothing published for this version
- 1.0.118 Jan 2017
Nothing published for this version
- 1.0.030 Sept 2016
Nothing published for this version
- 1.0.0-rc.25 Jul 2016pre-release
Nothing published for this version
- 1.0.0-rc1 Jul 2016pre-release
- 0.8.228 Jun 2016
Nothing published for this version
- 0.8.128 Jun 2016withdrawn: incorrect dist build
Nothing published for this version
- 0.8.023 Jun 2016
- 0.7.122 Jun 2016
Nothing published for this version
- 0.7.021 Jun 2016
- 0.6.323 Apr 2016
Nothing published for this version
- 0.6.28 Mar 2016
Nothing published for this version
- 0.6.17 Mar 2016
Nothing published for this version
- 0.5.14 Mar 2016
Nothing published for this version
- 0.5.04 Mar 2016
- 0.4.22 Mar 2016
Nothing published for this version
- 0.4.11 Mar 2016
Nothing published for this version
- 0.4.01 Mar 2016
Nothing published for this version
- 0.3.016 Feb 2016