If (beta)
or (alpha)
is marked in front of any release, it can be
installed as npm install vuex-module-decorators@beta
(or alpha similar).
- more typesafe
@MutationAction
- you cannot
mutate
keys not in the module - the returned object must be a partial of the module
- you cannot
- initializing properties with
null
and then running@MutationAction
is possible now
- we will distribute in ES5 as a lot of people still use ES5 target for their websites
- fix context getting lost in actions
- via pr 55
- add ability to access getters inside actions simply as
this.getterName
- distribute as ES2015 (users need to transpile)
- inside getters we can access
rootState
androotGetters
- Use
this.context.rootState
andthis.context.rootGetters
- Use
- in
@Action
and@MutationAction
functions -- Now introduces
rawError
decorator option- By default they are set to false to keep the old behavior
- Old behaviour - it is wrapped in a helper message
- If set to true, errors inside actions will be thrown as it is
- Now introduces
- in
@Action
functions -commit
decorator option can now be optional
- in
@Action
functions -this.stateField
works pointing to fields in the module's statethis.context.commit('mutationName', payload)
is way to trigger mutationthis.context.getters['getterName'])
is the way to use getters- iff your module is dynamic you get more typesafety
- calling
this.mutationName(payload)
will work as well - accessing
this.getterName
will work as well
- calling
-
allow
getModule()
even for non-dynamic modulesNOTE: From now on you have to use
getModule(ModuleClass)
instead of the earliergetModule(ModuleClass.prototype)
-
update to prettier code formatting
- fix
unable to construct without new
error for transpiled ES5
- add
module
field to package.json for ES6 module loaders- tree-shaking supported
- distribute cjs, esm and minified cdn package separately