Hello, I'm trying to implement dropdown handling, which requires a global state to make sure only 1 dropdown is open at any time.
I was able to get to this stage: https://jsfiddle.net/ssr9pkLa/1/
However, check the comments on lines 12 and 45. The VM will be refreshed only if the state root property is changed AND it is displayed in template.
Looking at the javascript object of state properies I see that there are custom getters and setters for deep object trees, but doesn't look like they're really being tracked.
Is that by design, that objects can't be tracked?
Thanks.
It is by design of Vue. We must initialize possible object properties or use Vue.set to add new object properties.
https://vuex.vuejs.org/en/mutations.html#mutations-follow-vues-reactivity-rules
Most helpful comment
It is by design of Vue. We must initialize possible object properties or use Vue.set to add new object properties.
https://vuex.vuejs.org/en/mutations.html#mutations-follow-vues-reactivity-rules