I know that the title maybe a bit complex to understand (I didn’t know how to put it simply), so here’s a minimal example. Imagine I got a reactive object ObjectA and I try to copy one if its property: When I have a template that look like this: Then, the name is reactive (meaning, if I change it somewhere,
Tag: vue-reactivity
Why Vue will update only once when two reactive data mutation super close?
Please see this minimum example The console will only log “Triggered!” once, why is this happening? And how does Vue determine this batch update? Answer From the Vue guide on reactivity: In case you haven’t noticed yet, Vue performs DOM updates asynchronously. Whenever a data change is observed, it will open a queue and buffer all the data changes that
Vuejs Es6 class reactivity
i’m trying to have a computed property in vuejs associated to a es6 class. My Vue instance looks like this: My class looks like this If i try to do something like that: but the setter is never called, like the reactivity has been lost and i don’t understand why. I also try: I pass customClass as a prop, but