Answer the question
In order to leave comments, you need to log in
How to trigger reactivity when repeating the same primitive value?
Let's say I have a page primitive with a value of 1.
export default {
data() {
return {
page: 1
}
},
watch: {
page(val) {
console.log(val)
}
},
methods: {
setPage() {
this.page = 1;
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question