davestewart/vue-class-store

What are the "dangers" of _not_ using this library

stam opened this issue · 0 comments

stam commented

Hey, not sure if this is the right place to ask this, please let me know if there is a better place for this.

In our application we also store state in classes, because of better layering, being easier to test, etc. etc.
However the particular implementation of this library won't work in our usecase as our models are nested.
A farm "VueStore" contains several animals, etc

If you just put a regular JS class in vue state, it makes that instance reactive, binds a proxy to all its getters and setters which can cause components to update.

Apart from the computed values and watch lifecycle hooks that your library provide, does not using your library cause any issues down the line of just making class instances reactive?

Sorry if this is the wrong place to ask this