I am currently working with moment.js inside a Vue component but I am not seeing certain changes show up in vue devtools.
My example:
export default {
data() {
return {
moment: moment(),
};
},
methods: {
prevMonth() {
this.moment.subtract(7, 'days');
},
nextMonth() {
this.moment.add(7, 'days');
}
}
};
I am guessing this has something to do with the fact that I am calling a method on my moment data property instead of manipulating it directly like a number. An example like this works perfectly and updates my count in the vue devtools:
export default {
data() {
return {
count: 0,
};
},
methods: {
prevMonth() {
this.count--;
},
nextMonth() {
this.count++;
}
}
};
Is there any way to force the vue devtools to reload or show my change in any way?