Hacker News new | ask | show | jobs
by Semaphor 1293 days ago
> - Very poor typescript support.

If you use class components and prop decorators, the TS support is actually pretty nice. Kinda boilerplate heavy, but nice.

4 comments

I've worked professionally in both Vue 2 and React. Even with class components and prop decorators you still have the annoying Vue template DSL where you don't get any TS support.

In comparison JSX will be checked by typescript, so in that regard JSX (and therefore React) is superior.

I really enjoyed using these tools, it felt idiomatic to have a class per component with props and data as fields on the class - but it seems like there's now no upgrade path for us folks in Vue 3 land.
I used those too, but it makes the upgrade to Vue 3 quite a bit harder.
Composition API has the best Typescript support available in Vue 2. It's supported out of the box in 2.7, and a plugin in previous versions. The decorator syntax is unsupported in Vue 3 and shouldn't be used.