DEV Community

Discussion on: Watch for Vuex State changes!

 
viniciuskneves profile image
Vinicius Kiatkoski Neves

Hey Oscar,

Exactly. Once you subscribe you have to unsubscribe unless your Subject has some kind of check to remove the Observer in case it doesn't exist anymore.
For Vuex you've to do it manually, which means you've to unsubscribe once your component is destroyed.
If you don't do it you might end up in trouble as you mentioned =]

I didn't get if you were asking or not but I'm just confirming hehehe

In case you've any other question, let me know =]

Thread Thread
 
opolancoh profile image
Oscar Polanco

Thanks!!