3 ms·
Vue templates are far worse than JSX. JSX/TSX is understood by tools so you get static typing, code completion, go-to-definition and all the other benefits of m
by IshKebab 5y ago
Vue templates are far worse than JSX. JSX/TSX is understood by tools so you get static typing, code completion, go-to-definition and all the other benefits of modern tooling.
Static typing alone is enough to rule out Vue in my opinion. I even went as far as writing a static type checker for Vue to work around it. It works by compiling the Vue template to a dummy Typescript function that only typechecks if your Vue types are correct.
It found loads of bugs in our code.
- manigandham 5y agoThat's just a tooling issue. HTML has been around for a long time, and plenty of tools provide typing. Also Vue supports typescript. Vue itself throws errors if the variables don't exist in your template. However you can use JSX with Vue if you want. All JS libraries are fundamentally the same, and all templating boils to a single function with input->output. Vue just offers HTML instead of JSX by default and it's far more useful in many instances.
- IshKebab 5y ago> That's just a tooling issue. No it isn't. There isn't even a way to write down the types properly in Vue templates. Anyway just saying "it's a tooling issue" doesn't make it not an issue! > Also Vue supports typescript. "supports" is a scale, and the support isn't nearly as good as React/TSX.
- manigandham 5y agoVue 3 is written in typescript and comes with full definitions. The composition API is all regular functions. It doesn’t get better supported than that.
- IshKebab 5y agoYes it does. React has better support!
- vagrantJin 5y agoWe don't write code for the tools. We use tools to write better code. Simple eh?
- IshKebab 5y agoTools help us write better code. If a library doesn't let us use tool then our code will be worse. Simple eh?
- vagrantJin 5y agoNah hermano. Bad code isn't a tools fault. That's just down to a lack of skill and poor decision making in terms of tools to use for the right job. Don't blame a knife for cutting your finger, don't blame the coffee table for yiur stubbed toe, don't blame tools for your bad code.