4 ms·
Note that Typescript with React is totally possible.
by mercurial 10y ago
Note that Typescript with React is totally possible.
- rubber_duck 10y agoThat's true but it's not what I was getting at - Angular 2 is developed in TS - it's designed with TS in mind - everything is built on classes, decorators. React is a mishmash of various approaches and tools - functional, OO, embeded markup, etc. You can get type definitions for it but it's not really "natural", for eg. support libraries just have terrible type definitions because they don't map to typescript type system nicely at all - which is what I was getting at.
- CCPony 10y agoWell, yes... and no. When I tried to use Typescript with React I couldn't help but feel like I was squeezing a square peg through a round hole. Eventually you can do it, but it's an effort. Ultimately you end up with something marginally better than plain JS. Since virtually ALL available React tutorials, courses, quick starts, etc are written in JS, there is very little support out there for TS. With Angular2, it's all TS all of the time. And, to me, that's incredibly important.