DEV Community

Discussion on: Vue 3 just got me from interested to excited

Collapse
 
ortonomy profile image
πŸ…–πŸ…‘πŸ…”πŸ…–πŸ…žπŸ…‘πŸ…¨ πŸ…žπŸ…‘πŸ…£πŸ…žπŸ…

The new composition API is actually more difficult to understand. Vue2 was very declarative with the options API. I’m not sure what advantages this brings? It’s not like you have to include all options...

Moreover, this seems like overkill to fix the mixin problem? Sounds like they just got hook envy....

Collapse
 
michi profile image
Michael Z

This post was more to show the new syntax, not the benefits of the composition API. Hence, my example is actually really bad from that stand point. Composition API shines once you have (with options API) related logic spread across different options (data, computed, methods, mounted, destroy, etc.). Composition API let's you group this logic together. It's not going to be an all-in replacement for Vue 2's options API. I can see people continue using it.