[Vuejs]-State not get updated as expected in vuejs

0👍

I hope you will find my answer useful.
If I get you right, you are trying to alter the store but it’s not working ?

Short answer

use your method addLine only when the store value changes with the watch

Some quick notes:

  • avoid mutating the state from the components
  • avoid mapping the state, use state getters instead
  • not a good idea to have the an interval just to update the template from the values from the store. There is a way to do a computation when the state machine (store) change

PS: I am available for 15min so that we can pair program on this.

Leave a comment