TypeScript or JavaScript for Ionic React

Hi, I’m a newbie here. I don’t have much experience with Typescript and wonder if it’s still efficient and fully supported just to use traditional Javascript for an Ionic + React project. I hope to get your opinions on the pros and cons of TS and JS on Ionic React.

Thank you :smile:

I strongly urge you to learn the basics of TypeScript.

TypeScript is opt-in; you can make it as strict or as loose as you want. You don’t have to strictly type everything.

TypeScript is basically “JavaScript with types” so if you already know JavaScript, you know most of TypeScript; it’s more like adopting a new coding style than learning a new language.

Since Ionic is already in TypeScript, you will lose a lot of functionality if you stick to regular JS-- such as autocompletion for property names in your IDE/code editor.

Also, there’s ton’s of good tutorials and books on TypeScript, and the official documentation is a great place to start.

2 Likes