vuejs / vue-class-component

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

So ... still going to be supported for vue3 or ded? #632

Open kabaluyot opened 1 year ago

kabaluyot commented 1 year ago

Hello especially to the maintainers of this repo.

Looks like last update was 2 years ago. I created an issue regarding class component support for vue3 (https://github.com/vuejs/vue-class-component/issues/402)

Is it ded?

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

kabaluyot commented 1 year ago

@rdhelms Yeah I saw that one. Might give it a shot and stick to Vue 3 IF it becomes the official replacement of vue-class-component. It's really hard to think of production apps without official support for long term maintainability.

Abandoning this vue-class-component really broke my heart. We heavily (100/100) use it along with Nuxt 2 (via nuxt-property-decorator) in all our projects. Maintaining codebase is suuuuuper easy and we made a handful of templates for it.

We are eyeing now to use Svelte for new projects in coming months. Will still stick to Nuxt 2 with class component for currently maintained projects. LFG!

sienrik15 commented 1 year ago

Work with "vue-class-component": "^8.0.0-rc.1", "vue-property-decorator": "^10.0.0-rc.3", "vuex-class": "^0.3.2"

ruojianll commented 1 year ago

@kabaluyot It's official recommended now. https://class-component.vuejs.org/

rdhelms commented 1 year ago

@TokugawaTakeshi as mentioned above, a deprecation notice has been added here in vue-class-component and recommending vue-facing-decorator instead. I'd suggest taking a look at that package and contributing!

I was in the same boat as you, and I was about to start writing my own replacement package when I discovered that vue-facing-decorator accomplished what I needed.

TokugawaTakeshi commented 1 year ago

@rdhelms

Thank you for the introduction of "vue-facing-decorator". What I can promise is I'll use "vue-facing-decorator" instead of deprecated "vue-class-component" and "vue-property-decorator".

However, I can't promise anything about contributing because:

  1. I have no time to dive into code of third-party solutions
  2. In my solution, I am planning the another API

Anyway, I am very grateful about your efforts, and I will use "vue-facing-decorator". My star for your repository.

Haixing-Hu commented 9 months ago

Hello everyone,

I've created a brand-new vue-class-component for Vue 3. It's implemented in pure JavaScript, eliminating the need for TypeScript configuration. Additionally, it incorporates the most recent (as of May 2023) stage 3 proposal of JavaScript decorators and stage 3 proposal of JavaScript decorator metadata.

You can find it here: vue3-class-component

We welcome feedback, bug reports, and contributions. Feel free to get involved!

@kabaluyot @rdhelms

TokugawaTakeshi commented 9 months ago

@Haixing-Hu

Thank you for the new class syntax package. I suppose, the dealing with new decorators API was not easy.

Would you please to provide the TypeScript types definitions for your package?

Haixing-Hu commented 9 months ago

@TokugawaTakeshi

Sorry, I cannot. The library is written in pure JavaScript. That's the main difference between my library and vue-facing-decorator. Personally, I prefer the simplicity of JavaScript compared to the complex type system of TypeScript.

TokugawaTakeshi commented 9 months ago

@Haixing-Hu

Understood. Being the author of the own library, you can decide. But please note that I and other users of TypeScript cannot use your library which cause the less number of library downloads, stars on GitHub, etc.

Haixing-Hu commented 9 months ago

@TokugawaTakeshi

Due to the differing syntax of JavaScript decorators and TypeScript decorators, it is not possible for me to create a library that supports both languages. However, TypeScript users can utilize the vue-facing-decorator library, which offers similar functionality to mine.

ruojianll commented 8 months ago

@Haixing-Hu The output(compiled) library of TypeScript project can be used in pure JavaScript also. The output includes declaration files(.d files) and pure JS files. If we use them in a pure JS project, declaration files will be ignored. So we could use vue-facing-decorator in pure JS project after we setup decorator environment.

ruojianll commented 8 months ago

@Haixing-Hu The key point is that TypeScript is a compiler, it compiles TS files to standard JS which could be used in pure JS projects standalone and provides extra declaration files which could be used in other TS projects.