re: VueJS is dead, long live VueJS! VIEW POST

TOP OF THREAD FULL DISCUSSION
re: To be honest I hadn't had a problem either but I've never worked on a massively large Vue app either. Maybe they could have just introduced a diffe...

You can get clashes in the Function API too, if you spread together the return values of several useXXX() functions and return them in setup().

@ju66ernaut It is a design problem, but for example if you have two mixins both fetching a remote API, you need to be extra creative on the isLoading property name to avoid clashing, and check every other mixin to be 100% safe. Another problem is that if you use two third party libraries as mixins and they both declare a property, computed, or method with the same name you are pretty much out of options.

@amcsi Yes, but with the spread operator you are explicitly merging the keys and somehow take full responsibility of what can potentially clash 😄. With mixins your only option is to rename one of the properties, which can be problematic or even not possible if mixins come from 3rd party libs.

I don't wanna convince you that 3.x API is 100% better than the current, but as you can see the current implementation has some issues that cannot be solved easily

@matteorigon I would not think clashing mixin names is a design issue where vuejs is 100% responsible. Forgoing elegance and simplicity to cater for individuals with thoughtless mixin naming is absurd. Maybe another solution could be suggested where intelligent mixin prefixing could help solve this problem.

code of conduct - report abuse