As a developer, there are many choices to make when building your next application. The rise of serverless technologies allows developers to build and run applications without thinking about servers and this also allows front-end developers to create full-stack applications and build SAAS web apps.
What is TypeScript?
You can easily use Typescript when starting a new React application by running
yarn create react-app my-app --template typescript or work with Angular, which comes with Typescript by default.
How popular is TypeScript?
TypeScript seems to be taking over front-end development. Almost 90% of developers (who filled in the state of js survey) admit they would like to use or learn TypeScript in their next project. Besides that, it's one of the most loved languages, according to the 2019 Developer Survey by Stack Overflow.
My personal experience
I have been working with Typescript full-time for over a year now, and I have experienced the benefits of using TypeScript when working in a team. Something I personally like is, for example, the rich IDE support. I’m using VSCode and it offers features like code navigation, autocompletion, and providing accurate suggestions. You also get feedback while typing like flagging type-related errors as soon as they occur. This can help you write more maintainable code.
Here are, in my opinion, the pros and cons of choosing Typescript for your next project.
Pros for using Typescript
- It has rich IDE support
- It has object-oriented programming features
- It helps to spot bugs early
- It is used in popular frameworks
- It’s growing in popularity
Cons for using Typescript
- Writing more code
- Takes time to learn
- Adds complexity
Although TypeScript requires you to write some more code and could take developers some time to learn, it’s benefits outweigh that in my opinion. We also see steady growth in the adoption of the language so I think this is not a hard decision to make. My stack choice: TypeScript.
If you think differently, please try to change my mind! Any other opinions? Leave them in the comments.