4 ms·
I see a lot of Angular comments, has anyone had good/bad experiences with TypeScript and React?
by chrisan 10y ago
I see a lot of Angular comments, has anyone had good/bad experiences with TypeScript and React?
- Tx3 10y agoIn the blog post, I have one example of the React use case with screen capture. I find it very helpful to have properties defined, so when I use the component, I immediately know what are the props I can provide. There are some 3rd party React components that won't have type definitions yet, but the popular ones are well covered. I have written most of the components I have used, so I haven't had many problems.
- mikerichards 10y agoFrom a React newbies's perspective, the React community is much more in the es6 camp than Typescript. Many of the starter kits are in es6. It's not a huge deal. I actually write most of my front-end code these days in Aurelia, which is written in es6, but they actually have type annotations which Babel knows how to deal with. So basically the tooling can auto-generate the *.d.ts files for you. That said, Typescript natively supports React syntax through TSX files, which is nice.
- batuhanicoz 10y agoShameless plug: When we've started switching to TypeScript and was looking for a good starter, we've couldn't find any that we've liked so we've created & open sourced our own. Maybe it can help people who are considering using TypeScript with React: https://github.com/barbar/vortigern https://github.com/barbar/vortigern
- DanRosenwasser 10y agoWe also have an official doc on getting started with TypeScript, React, and Webpack if anyone's interested: https://www.typescriptlang.org/docs/handbook/react-&-webpack.html https://www.typescriptlang.org/docs/handbook/react-&-webpack...
- jacalata 10y agoMy team uses it at work and love it. Both of them were new to me when I started (was using angular in vanilla JS) and it's been a really nice experience, the type definitions definitely help with learning a new codebase. I'm thinking of introducing typescript to my personal projects at home, but so far I've been too lazy to do the initial setup work.