Hacker News new | ask | show | jobs
by adevx 1778 days ago
I really enjoyed working with Vue 2 until I started using TypeScript.

Vuex, the goto state manager just wasn't built for it (I ended up using vuex-module-decorators). Type safe templates were only partially possible with Vetur (vs code extension) but it was slow and resource hungry. I'm sure in Vue 3 this is much better now, but while evaluating to migrate to v3 this wasn't the case.

I became interested in React, because I was looking for a way to generate type safe email templates. Started using .tsx files with a library called typed-html and loved it so much that I end up migrating to React (now rendering email templates with ReactDOMServer.renderToString(element).

Still miss Vue's simplicity at times but having rock solid TypeScript support is something I value more.

1 comments

Vue 3 has composition api which is more typeo friendly.

And Pinia is a vuex alternative which has good typescript support. Vuex 5 will have similar api as pinia

I'm curious how Pinia works. I actually use MobX with VueJS and the way it has to hack itself into VueJS is a bit of a shame. I wish there would have been a more official integration point for third party reactive libraries.