Our great sponsors
-
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.
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
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.
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.
Related posts
- Taming cross-service database transactions in NestJS with AsyncLocalStorage
- DRY Principle in Your AWS SAM Application with Middlewares
- [Nestia] Boost up your NestJS server much faster and easier (maximum 20,000x faster)
- Using OOP patterns in an express application?
- Ts.ed: A TypeScript framework for writing robust servers