Can the understanding of several core concepts of Vuex be compared with the options of Vue?

recently, I have been reading the official tutorial of Vuex and referring to some blog articles, and then I have summed up myself to see if the status of Vuex (state) can be understood as the data? of Vue instance. Getter is treated as a similar calculation property, and mutation is similar to the methods?
of Vue components. In addition, several map functions, when looking at API, find that the number of parameter types is the same. Can it be understood as a simpler mapping of the previous options? Just to make it easy to use within a component, without having to write a long, long piece of writing like this.$store.state.XXX?

Jan.25,2022

personal understanding is


there is no problem with getter analogical calculation properties
but mutation requires pure functions, and methods does not have this restriction

Menu