In my Vue.js app, I am facing an issue where an array value is becoming reactive even though I want it to remain un-reactive. The array should only be updated when a specific "refresh" action is completed. However, every time a new value is assigned to the array, it immediately changes in reaction to the data in the assigned value.
For instance, let's say I have a method called refresh()
. This method is supposed to update displayedData
(which should not be reactive) with the data from currentData
(which should be reactive). The goal is to have displayedData
only update when the refresh method is called.
methods: {
refresh: function() {
this.displayedData = this.currentData;
}
}