vue-property-decorator VS vue-class-component

Compare vue-property-decorator vs vue-class-component and see what are their differences.

vue-class-component

ES / TypeScript decorator for class-style Vue components. (by vuejs)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
vue-property-decorator vue-class-component
10 13
5,525 5,808
- -0.1%
3.2 2.9
about 1 year ago 6 months ago
TypeScript TypeScript
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

vue-property-decorator

Posts with mentions or reviews of vue-property-decorator. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-12-16.
  • How often do you use Decorators, and if you do was there any push back within your team?
    3 projects | /r/typescript | 16 Dec 2022
    In my last project these two were used a lot: https://github.com/kaorun343/vue-property-decorator and https://class-component.vuejs.org/
  • Vue + TS without class component ? No way!
    3 projects | dev.to | 15 Sep 2022
    Designed for vue 3, do the same work like vue-class-component and vue-property-decorator.
  • Any vue 3 with Typescript resources or tutorials ?
    3 projects | /r/vuejs | 28 Feb 2022
  • Objects and v-model in Vue3
    2 projects | dev.to | 30 Nov 2021
    When I was using Vue2 along with vue-class-component and vue-property-decorator it was easy to synchronize v-models between components simply using @ModelSync(). When Vue 3 came out with its Composition API another way was needed to achieve the same result as if Class Component was used.
  • Why I Love Vue 3's Composition API
    1 project | /r/vuejs | 2 Nov 2021
    This is still not better than Vue Class Component & Vue Property Decorator . Very easy syntax, looks like any other OOP language, and looks so much cleaner.
  • Wait for Vue 3 to add Typescript?
    4 projects | /r/vuejs | 19 Aug 2021
  • Is it ready already?
    2 projects | /r/vuejs | 18 Apr 2021
    vue-property-decorator: This library works hand in hand with vue-class-component so that you can define properties/methods on your class for things like watchers, properties, etc:
  • How to create a scalable vue.js setup (Part I)
    4 projects | dev.to | 17 Feb 2021
    The next thing to tackle for a scalable application is, that we want to have a well written component that is easy to read and to reuse. Vue components are usually single file, which has it's benefits (e.g. if you want to change some css, and then html and oh, you also need to introduce this property in typescript...). It's also easier to maintain some code standard about how large a component should possibly become, if you had single file components (e.g. >250loc => linter error). To additionally increase readability, I like to use typescript class components flavoured with vue property decorators.
  • You should be using Vue Class Component
    1 project | dev.to | 16 Feb 2021
    Here, we will cover only the basics, the idea is in the future to create an article on Vue-Property-Decorator that complements the usage of this library.
  • Aprendizados de 1 ano de projeto em vue.js com escopo ultra caótico
    2 projects | dev.to | 26 Jan 2021
    Vue2 não é muito bom pra lidar com typescript de forma vanilla, então o próprio core team e a comunidade criaram soluções pra você ter sintaxes alternativas (nada muito diferente) que suportam os toolings mais modernos e que tiveram maior adoção no decorrer dos últimos anos, como o vue-class-component, vue-property-decorator e o vuex-class. O caso mais notório de ferramenta que tira proveito disso, com certeza é o typescript. Com essas tecnologias, usar typescript é 100% possível, e usando essas sintaxes alternativas, diria até que o código fica mais enxuto e claro do que o vue sem nada (@Action do vuex-class, pra mim, tem uma sintaxe mais agradável que mapActions do vuex cru, por exemplo). Começamos o projeto sem, mas o Brunão começou a implementar usando isso e com uma curva bem pequena de aprendizado, aderimos felizes ao novo método de escrever componentes vue2.

vue-class-component

Posts with mentions or reviews of vue-class-component. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-04-11.
  • The Rear-Vue Mirror: My Open-Source Origin Story
    9 projects | dev.to | 11 Apr 2023
    This was a good change. Evan has always been extremely good at putting his finger on the pulse of the frontend community. If there's a feature or paradigm that people love that would fit in Vue, Evan will incorporate it. Over the years, Vue has implemented (and sometimes later deprecated) dependency injection, JSX support, custom elements, Angular-style class components, Svelte-style ref sugar, and now Solid-inspired compiler optimizations. They even changed the order of a Vue file to match that of Svelte: first the script, then the template.
  • Is it possible to use Vue 3 components in a Vue 2 app?
    1 project | /r/vuejs | 7 Mar 2023
    That is the whole point. Just check this code. If it was written in a basic vue 2 syntax style it wouldn't be a probrem at all :D So I am looking for a workoround to reuse either a component, or the whole module(page). Some trick which won't require a refactoring of a large app.
  • React Veterans: Have you gotten into Vue and what are your thoughts?
    1 project | /r/webdev | 9 Oct 2022
    The docs are not wrong perse because they distance themself from this package: https://github.com/vuejs/vue-class-component But at the time they recommended this package for best ts experience in vue 2. YOu can see that Evan's account is the second biggest contributor.
  • Vue + TS without class component ? No way!
    3 projects | dev.to | 15 Sep 2022
    Vue(TS) is abandoning vue-class-component, preferring to ask developers to use the Composition API. See https://github.com/vuejs/vue-class-component/issues/569
  • A vue-class-component alternative one in vue3.
    2 projects | /r/vuejs | 7 Jun 2022
    Due to `vue-class-component` is [deprecated in vue3](https://github.com/vuejs/vue-class-component/issues/569). I built a alternative package to do that with many features.
  • Support for vue-class-component going forward
    1 project | /r/vuejs | 19 Apr 2022
    This topic has come up a few times, but I'm hoping that at some point there can be some official guidance from the Vue team on vue-class-components.
  • Trying to learn vue3 (class style component)+ typescript + pinia
    1 project | /r/vuejs | 7 Mar 2022
    According to the Github commit history, the last commit was on 15 Dec 2020. Also, in this conversation, it's saying this library is not maintained anymore, that's why it doesn't work with Vue 3 at all. I did switch from Vue 2 with class style component to Vue 3 since last May. I also switch from Vuex4 to Pinia since last December. I don't have any big issue regarding pass props through different components or using Pinia. The best way to understand how it works is checking Vue 3 and Pinia official document.
  • Vue 3 production-ready analysis
    11 projects | /r/vuejs | 25 Jan 2022
    I'm particularly a little salty about the situation of vue-class-component. This is an officially supported vue library that thousands of people use (including myself), and it has been left to die on the vine with regard to Vue3. It has been in the same RC state for over a year, with no communication or support as to what is happening.
  • Thoughts about the state of Vue & the 2/3 transition
    3 projects | /r/vuejs | 21 Jan 2022
    3) Previously officially supported projects are being essentially abandoned. Vue Cli has been waiting for V5 for the past year, with no indication of release date, and now is in "maintenance mode". Vue Class Component has similarly been waiting for an update for over a year, and still does not have an official release that supports Vue3.
  • Objects and v-model in Vue3
    2 projects | dev.to | 30 Nov 2021
    When I was using Vue2 along with vue-class-component and vue-property-decorator it was easy to synchronize v-models between components simply using @ModelSync(). When Vue 3 came out with its Composition API another way was needed to achieve the same result as if Class Component was used.

What are some alternatives?

When comparing vue-property-decorator and vue-class-component you can also consider the following projects:

composition-api - Composition API plugin for Vue 2

InversifyJS - A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.

vue-facing-decorator - Vue typescript class component decorators

class-validator - Decorator-based property validation for classes. [Moved to: https://github.com/typestack/class-validator]

vite - Next generation frontend tooling. It's fast!

vuex-module-decorators - TypeScript/ES7 Decorators to create Vuex modules declaratively

create-vue - 🛠️ The recommended way to start a Vite-powered Vue project

vitesome - A simple opinionated Vue3 Starter Template with Vite.js

vitesse - 🏕 Opinionated Vite + Vue Starter Template

vue-cli - 🛠️ webpack-based tooling for Vue.js Development

core - 🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.