- Added
Module.build({ ..., stateAsFunction: true })
, for Nuxt.js.
- New mutation
xxx$unshift
added for array state by @Yuhannaa
- You can map with variables now. => See
- You can use
get
andaction
in methods now. commit
has been added as a component helper.
- You can pass key, value for
$find
store.getters["myModule/posts$find"]("id", 3);
- You can use
get
orsync
mapper in your component to map nested path of object like the following:
computed: {
bio: get("myModule/user", "profile.bio");
city: sync("myModule/user", "address.city");
}
- You can pass
strict: false
when you set value to an object, then it won't check validation of your path.
Module.build({
state() {
return {
user: {}
}
}
})
...
store.commit("myModule/user$set", {
key: "address.city",
value: "Singapore",
strict: false
});
This enables you can add keys dynamically.
- Initial public release