You can modify state? in the getters of vuex.

there is an array list, in store.state. I created a getList, in getters and then mapGetters the getList into a subcomponent. In this subcomponent, I forEach, the getList array and modify the value of item in it. I found that it seems that the list of all components has been refreshed by Synchronize.

according to my previous understanding, getters cannot modify the original array, but mutation can, but now getter can. Whether
or getter/mutation can modify the original data is actually a requirement of programming style, and there is no actual limit. In fact, you can change if you want?

Apr.10,2021

I understand it as the computed attribute


the first reaction, not because of getters, but because of object modification, which should not happen if you copy it first and then modify it.


it is suspected that there is no strict mode, so you can modify


directly by reference. The willingness of getter is to process raw data and return new data

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b315cf-2bd6f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b315cf-2bd6f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?