question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deprecate vue-class-component

See original GitHub issue

Here 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:open
  • Created 2 years ago
  • Reactions:21
  • Comments:53

github_iconTop GitHub Comments

49reactions
Maia-Everettcommented, Oct 10, 2021

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 use vue-class-component in all my personal Vue projects.

28reactions
andrewpaymentcommented, Oct 16, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Vue Class Component is not being updated anymore?
In fact, VUE Components are classes of component instances. ... answer is yes, it is basically deprecated by the Vue team abandoning it....
Read more >
Vue Class Component: Overview
Vue Class Component is a library that lets you make your Vue components in class-style syntax. For example, below is a simple counter...
Read more >
Vue + TS without class component ? No way!
Today, vue-cli is deprecated to create a new project. The new way is to use Vite and it does'nt provides vue-class-component module and ......
Read more >
vue-class-component - npm
ES201X/TypeScript class decorator for Vue components. Latest version: 7.2.6, last published: 2 years ago. Start using vue-class-component in ...
Read more >
How to use vue-class-component - Stack Overflow
Due to vue-class-component is deprecated in vue3. There is a alternative one in vue3. vue-facing-decorator.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found