Why Vue Class Component is not being updated anymore?

This page summarizes the projects mentioned and recommended in the original post on /r/vuejs

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • vue-facing-decorator

    Vue typescript class component decorators

  • Currently it looks like there are some efforts to create a new library that is Vue 3 compatible: https://github.com/facing-dev/vue-facing-decorator

  • react-class-decorator

    decorator experiment with react

  • Assumptions aside, we do know that Composition API is what's being pushed as a typescript-friendly solution and the preferred approach so if you really like the Class syntax, Vue might not be the best fit anymore. There are a few libraries out there that make use of Classes and decorators. Angular is one. Aurelia is another one. You could even use React as I don't think it's support for class syntax will be going away anytime soon. One night recently I sat down and wrote some decorators for React classes, including a Prop and Watch decorator. The Component decorator handles the constructor and state binding (setting up getters and setters). Check it out here. There's nothing particularly magical about implementing your own decorators. You could do the same kind of thing for Vue pretty easily as well and just make a class that outputs an options object. I've seen a proof of concept here.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • vue3class

  • Assumptions aside, we do know that Composition API is what's being pushed as a typescript-friendly solution and the preferred approach so if you really like the Class syntax, Vue might not be the best fit anymore. There are a few libraries out there that make use of Classes and decorators. Angular is one. Aurelia is another one. You could even use React as I don't think it's support for class syntax will be going away anytime soon. One night recently I sat down and wrote some decorators for React classes, including a Prop and Watch decorator. The Component decorator handles the constructor and state binding (setting up getters and setters). Check it out here. There's nothing particularly magical about implementing your own decorators. You could do the same kind of thing for Vue pretty easily as well and just make a class that outputs an options object. I've seen a proof of concept here.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts