vuejs / vue-class-component

ES / TypeScript decorator for class-style Vue components.
MIT License
5.81k stars 431 forks source link

Deprecate vue-class-component #569

Open Mikilll94 opened 2 years ago

Mikilll94 commented 2 years ago

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.

hnviradiya commented 1 year ago

this is sad indeed...the Options API is utilitarian in look and feel, but the Composition API is very untidy: ref() and .value is very much a framework lifting its skirt because they couldn't think of anything better...until they dreamt up $ and $$ to ref and unref a property...very untidy indeed. vue-class-component made Options API a little less shite and allowed me to avoid the complete shite of Composition API.

Yes. And for every function we have to write function prefix and its having its own scope, which is redundant in class componsnt. Without function we were able to access class properties directly with this statement.

rdhelms commented 1 year ago

I think @ruojianll 's vue-facing-decorator has a ton of potential...of all the alternatives to the original vue-class-component and vue-property-decorator configs that I've seen so far, that seems to work the best with our existing code with minimal changes. Has anyone else had a chance to check that out? I would love if we could come up with an official vue3 successor to these packages, since the maintainers here don't seem to be responding anymore

https://facing-dev.github.io/vue-facing-decorator/ https://github.com/vuejs/vue-class-component/issues/569#issuecomment-1145882492

JavascriptMick commented 1 year ago

I have a medium sized production codebase using vue-class-component and the property decorator (and vuex but thats incidental). I have everything How I want it, I can punch out features really fast and everybody thinks it's great. I was a supporter of the original RFP on a Class based syntax and was pretty cranky about it not getting up. I am also super frustrated by the splitting of the community and increase in startup complexity introduced by all the changes in Vue 3.

Having said that, I am using Nuxt 3 for a personal project (because SSR and SSO). I deliberately chose to use all the shiny things, composition api over options api, pinia over vuex. It was a very rough transition in my brain tbh and really not fun but at the moment, I have all of the new stuff working pretty good and I am reasonably productive.

In short, I think the horse has left the stable here. If we want Vue to be a robust framework with a strong community, I think we need to embrace the newer methods. Yes they do smell a little functionally, but it is still way better than react and nowhere near as silly as Angular. vue-class-component is a side road that was not taken a while ago and several new turns have been made since then. It's just not relevant.

At the end of the day, all of this BS arguing around and around just distracts from the real task of building real shit for real users. More side roads and options and dead ends in the framework just dilutes the current community and serves as a barrier to entry for new members to the community.

By the Same token, the individuals with leadership in the community need to quell their ADHD and stop changing every fucking thing every fucking major release. If Vue 4 has yet another way of doing things, you will kill the framework.

WhatNot911 commented 1 year ago

Class components are argueably easier to read, we have a huge codebase written in class, and it neatly serves as a bridge for backend monkeys to every now and then come out to the frontend to create a component or fix something in a class than in any other API that looks alien to them. So keep your grubby hands off class components XD 🧡

hnviradiya commented 1 year ago

Class components are argueably easier to read, we have a huge codebase written in class, and it neatly serves as a bridge for backend monkeys to every now and then come out to the frontend to create a component or fix something in a class than in any other API that looks alien to them. So keep your grubby hands off class components XD orange_heart

Can't agree anymore. Only reason I went with vue is this class component. Didn't realize it will stop supporting such a major feature (Not sure we should even call this a feature but like a framework). Thank god that vue facing decorator has taken this up.

dboris65 commented 1 year ago

Once upon a time, Internet Explorer 5 brought many new options in world of browsers. When Internet Explorer 6 appeared after it, it declared obsolete all the novelties of the previous version in order to introduce its new options and capabilities. And after it, Internet Explorer 7 was published, which declared deprecated all the solutions introduced in the previous two versions of IE in order to present its own new solutions and so on. Internet Explorer no longer exists today.

What I am about to say may seem harsh, but it is true. If you can't maintain some part of your project, don't even start it. Sudden changes in the development course of a framework cause suspicion among developers. If Vue 4 repeats a similar mistake, I fear it will end up like Internet Explorer.

For the future of this framework, it might be a good idea to consider returning support to this part of the project or to support the vue-facing-decorator project, but in such a way that it is not just a community-maintained project.

WhatNot911 commented 12 months ago

Internet Explorer no longer exists today.

Boy oh boy oh boy I just spent like an hour trying to make a table with a scrollable body for IE11 and XSLT, and I do that for money (as in a job) Trust me it ain't trully gone especially in some government sectors

dboris65 commented 9 months ago

Boy oh boy oh boy I just spent like an hour trying to make a table with a scrollable body for IE11 and XSLT, and I do that for money (as in a job) Trust me it ain't trully gone especially in some government sectors

Really? In that case, don't waste your time here.

WhatNot911 commented 9 months ago

Boy oh boy oh boy I just spent like an hour trying to make a table with a scrollable body for IE11 and XSLT, and I do that for money (as in a job) Trust me it ain't trully gone especially in some government sectors

Really? In that case, don't waste your time here.

No u XD