My Experience with TypeScript + React

TypeScript: “A strict syntactical superset of JavaScript that adds optional static typing” (paraphrased from: https://en.wikipedia.org/wiki/TypeScript).

I just finished injecting TypeScript into my last React web app (Done (for now)), and can say that I’ve enjoyed learning how TypeScript works: In particular its insightful nuances with React.

Why TypeScript? …One might ask… I’ll let their intro video tell the full story (link provided below), but for me, it is for proper code insights (IntelliSense) and `type` support that I feel helps me to become a stronger programmer.

How so? TypeScript will continue to help me focus more on a data-first design approach, as I tend to just start “creating”, and find myself designing (UI and data structure) along the way. Although arguably instinctive, this is SO not a good approach!

In addition, when you’ve gone through as much foreign (read, spaghetti) code as I have, being able to see an enforced data structure skeleton would have been welcome many a time.

How does it compare with Flow? There are quite a few articles on the subject, so I’ll defer to one of those.

Accolades:

TypeScript Intro Video:

At the time I watched it, the video could be found at the following location:

Tip! The reason I mentioned the video’s actual location is, I discovered if you remove “_high” from that URL, you can get a smaller version of the video, which in my case, was ideal for downloading and watching offline (I tend to rewind and pause a LOT).


Keith D Commiskey
https://keithdc.com

Leave a Reply