Hacker News new | past | comments | ask | show | jobs | submit login

> Vue3 also has `FunctionalComponent` now for the cases where you really want a simple component from a function – and again props work beautifully with Typescript.

This kind of reinforces my point about having to learn Vue. I personally think it's just unnecessarily building more API to memorize on top of JavaScript.

> In contrast, I'm finding integrating Typescript with the largely-JS React codebase I work with on the day job to be a bit nightmarish – the amount of prop destructuring which seems to happen in every single component makes typing their signatures a repetitive, tedious affair (largely due to TS's handling of destructured arguments).

To be fair, I find issues with this with TypeScript everything. Moreover, I think that is the natural progression for all typed systems or languages. I honestly prefer JS without TypeScript. I may use TypeScript some times for certain areas like having enums.

> All that said, appreciated reading your take on the two frameworks

I'm happy to hear that!

Merry Christmas to you too!




Fair points. I feel the need to clarify that you don't _need_ to use `FunctionalComponent` in bare JS, it just gives you an opportunity to type your component props (all `FunctionalComponent` is is a TS interface). This works just fine, from a `.tsx` file: ``` const MyComponent = ({ greeting = 'Hello' }) => <p>{greeting} world!</p>; ``` and can be used in TSX or standard-Vue templates as ``` <MyComponent greeting="Hi" /> ```

There is certainly more surface-area to learn about than React, though my feeling is that hooks have evened that equation quite a bit (one React component class vs. a whole quirky hooks toolkit; and admittedly Vue has forms of both as well). I'd argue both are far less to learn than Angular – I've had a tiny bit of experience there and recall feeling continually lost. I also think there are tradeoffs that justify extra bits of learning, but that's a subjective matter that (imo) can only be informed through some amount of firsthand experience building something complex with the frameworks.

Typescript is not everyone's cup of tea! Tradeoffs abound there – personally while I agree it can be cumbersome, I have trouble going back at this point (though I will when necessary). Interesting that you enjoy enums – I do as well but have found a distaste for them in the TS community which saddens me.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: