Comment by evnp
4 years ago
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.
No comments yet
Contribute on Hacker News ↗