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().
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.
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
True, my bad.
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.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.