Answer the question
In order to leave comments, you need to log in
Why is there no warning when changing the vuex state to bypass mutations?
Greetings.
The documentation clearly states:
You cannot directly change the state of a vault. The only way to make changes is to explicitly invoke the mutation.
export default new Vuex.Store({
state: {
tryvalue1: 'tryvalue1'
},
<template>
{{$store.state.tryvalue1}}
</template>
export default {
methods: {
changeTryvalue1(){
this.$store.state.tryvalue1 += '-newvalue';
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question