Saturday, January 25, 2020

VueJS? I guess no.

Two years ago I started VueJS + Vuetify project. At that moment it looked a good solution - a popular framework and rich library of components.

For today I can say that VueJS has few "features" that I really do not like and for the next project probably will take something else.

 Here is my list:
  • JS is pretty terrible. When you write a code it looks more or less acceptable. But when you need to support it, refactor, etc it became a nightmare. Typescript helps a lot but still, there is a big feeling that behind is JS. VueJS tries to swallow types on every step - when you access vuex store to get some values or to dispatch actions. Everything that's going on in the template is not type-safe. 
  • VueJS does not allow to declare events for components. There are two types of communication between components. From parents to children using properties. Children should declare own properties and then parents can use them to send information. The second type of communication is from children to parents using events. But in this case, there is no possibility to declare what events can be emitted from children to parents. So, you have to trust for documentation or to read the source code of the component.
  • There is not a proper inheritance. It is possible to extend the Html template using slots. Or to attach some common logic using mixins. But, for example, to extend form component to add additional text fields and some validation logic it is not possible.
So, these few features do not allow for me to reuse and combine my code as I want. At every moment I need to keep in the mind what types and where I use. Refactoring tools - I forgot what is that. All of that makes me slower and less productive. That's why next time I will try something else.

No comments:

Post a Comment