lume / classy-solid

Solid.js reactivity patterns for classes, and class components. See https://github.com/lume/element for a Custom Element system built with classy-solid.
MIT License
52 stars 2 forks source link

TypeScript does support stage 3 decorators! #7

Closed petermakeswebsites closed 1 week ago

petermakeswebsites commented 4 months ago

I had an idea to implement something like classy-solid does because one of the qualms I have with Solid is its unnecessary verbosity, which decorators would definitely help with. I also find class-based components to be a better fit generally because to me classes and mutability go hand-in-hand and often times component has mutating data - especially when signals are involved.

Anyway, stage 3 decorators are available in TS 5. I haven't really taken a look into your source code yet, just saw the readme and read that TS doesn't support them. I assume there's some stuff worth updating.

trusktr commented 1 week ago

Hey, thanks for writing! We have in fact since updated to Stage 3 decorators, and dropped legacy decorator support (too much work to maintain legacy alongside the new format, making the code messier).

Can't wait for decorators to land in a JS engines!