Skip to content

Releases: vuejs/vuex

v3.1.1

08 May 21:34
Compare
Choose a tag to compare

Features

Improvements

  • Improved jsdelivr support (#1496)

Fixed

  • Memory leak happening while using registerModule/unregisterModule (#1508)
  • Typings: Make mutation and action payload optional in definition file (#1517)

v3.1.0

17 Jan 15:12
Compare
Choose a tag to compare

Features

  • store.subscribeAction can now specify whether the handler should be invoked before the action, after the action, or both. 76818c1 (#1115 by @wa3l)

Improvements

  • Errors thrown inside action subscribers no longer cause the entire action to fail.

v3.0.1

03 Nov 18:53
Compare
Choose a tag to compare

Fixed

  • Type compatibility with TypeScript 2.6

v3.0.0

11 Oct 19:11
Compare
Choose a tag to compare

Breaking Changes

This major release only breaks backwards compatibility if you use TypeScript.

  • TypeScript type declarations have been updated to be compatible with Vue core 2.5+ and no longer work with 2.4 and below.

  • All type declarations are now exported using ES-style exports, and must be imported using ES modules syntax:

    import { Store } from 'vuex'

v2.5.0

11 Oct 19:06
Compare
Choose a tag to compare

New

  • store.registerModule can now be called while preserving current state if the module is already registered, by passing a 3rd argument as { preserveState: true }. Useful in server-side rendering.

  • New method: store.subscribeAction() - similar to store.subscribe, but for actions instead.

  • Namespaced modules can now also register global actions using the following syntax:

    const module = {
      actions: {
        rootAction: {
          root: true,
          handler: () => {}
        } 
      }
    }
  • The createLogger function now also accepts a logger option, allowing the user to provide a custom implementation of the console object to be used when logging.

v2.4.1

27 Sep 21:36
Compare
Choose a tag to compare

Fixed

  • Allow installation on different copies of Vue for testing purposes
  • Fix #731 by moving auto installation code into the store constructor (#914)

v2.4.0

29 Aug 15:04
Compare
Choose a tag to compare

New

  • New helper method createNamespacedHelpers: a helper-generator that generates namespaced mapXXX helpers for you:

    const { mapState, mapActions } = createNamespacedHelpers('some/nested/module')
    // everything generated by mapState and mapActions are bound to the module.

    See docs for more info.

    (@riophae via #800)

Misc

  • Various typing and assertion improvements.

v2.3.0

13 Apr 09:46
Compare
Choose a tag to compare
  • Modules can now declare state using a function - this allows the same module definition to be reused (e.g. multiple times in the same store, or in multiple stores)

v2.2.0

26 Feb 15:00
Compare
Choose a tag to compare
  • Now exposes ES module build by default for webpack 2 and rollup.

v2.1.2

06 Feb 20:45
Compare
Choose a tag to compare

Fixed

  • #524 avoid firing unrelated watchers when calling registerModule (@ktsn)
  • #528 ensure module local state always refers to actual state (@ktsn)