In my Nuxt
application I'm initialising computed properties with data retrieved from the store within the mapState
helper, however I also need to modify the value of these computed properties upon certain user actions.
Well I can't do that as I get a "has no setter" error when using that code:
computed: {
...mapState({
monRaw: state => state.currentWeek
I tried to define setters to no avail and the code doesn't make too much sense either:
computed: {
...mapState({
get: function (state) {
return state.currentWeek
},
set: function (state, data) {
state.currentWeek = data
}
Is it simply not possible to change computed properties' values when defined with mapState()?