Deprecate vue-class-component
See original GitHub issueHere you can read a post from Evan You @yyx990803 https://github.com/vuejs/vue-next/issues/4744#issuecomment-937369062
I feel like this library is not maintained anymore. Maybe it’s time to deprecate it?
vue-class-component
made sense for Vue 2.x when the TypeScript support was really bad. Currently this library provides no additional benefits, it just modifies the syntax of declaring a component. Additionally almost all users of vue-class-component
are using vue-property-decorator
(https://github.com/kaorun343/vue-property-decorator) which also seems abandoned.
For Vue 3.x the author of vue-class-component
@ktsn introduced a new way of declaring props in a component vuejs/vue-class-component#465 which IMO looks really ugly and most developers will not like it. This creates additional chaos in the Vue ecosystem because now you can use the new way of declaring props for class components or just install vue-property-decorator
and use decorators like it was before. Additionally you can also use normal Options API or Composition API.
In conclusion, my suggestion is to deprecate vue-class-component
and do not further suggest new developers using it.
There is no point to fragment the Vue ecosystem into class components and object components where class components provides no gain over the standard Vue syntax.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:21
- Comments:53
Top GitHub Comments
I, for one, would prefer someone to take over maintainership. I would hate to see
vue-class-component
die, as I love the object-oriented syntax (coming from desktop GUI toolkits like Swing and Qt) and usevue-class-component
in all my personal Vue projects.Just my two cents as someone learning Vue for the 2nd time (the first experience being a freelance project in 2015). So, take this with a grain of salt if you’d like.
I have an extensive background in AngularJS & Angular and designed an enterprise solution for the company I work for in Angular. I would like to blend in some Vue and bring my own Vue knowledge back up to see if we are missing anything so I’ve been working on an internal tool with Vue 3.
I’m only a few hours into this project and really just getting my feet wet, but I can tell you from an outside perspective the Vue ecosystem already feels extremely fragmented. With that being said with the continued dominance in the marketplace with TypeScript it seems like the community would be missing out big time by deprecating this project. I have been going back and forth between writing components in Options API and Composition API and they’re so maniacally similar that it’s painful to discern the differences as a novice, but I also am not sure which is better and honestly I don’t really know most of the pros and cons because they seem so subjective from everything I’ve read from the community so far.
I think a distinctly different coding paradigm like class declarations reaches out to a much larger sect of potential Vue developers. It specifically leans into TypeScript support and class declarations are significantly cleaner in TypeScript than handling either the Options or Composition APIs while trying to craft Vue components from my experience so far. It’s understandable that some might not find it necessary but it seems like class components offer a much different experience with better TS support than either Options or Composition, and ultimately have gotten my attention solely based on the fact that I’m very comfortable with TS classes.
I am going to try this library out and hope that my comments are considered because I think the learning curve for Vue is much steeper than it used to be because the different style options of writing Vue code now feel very similar but extremely nuanced and to be honest a bit frustrating sometimes to parse through which I should even use in a project.