DEV Community

Discussion on: Any contribution to Open Source is valuable

Collapse
 
nickytonline profile image
Nick Taylor • Edited

Proptypes are fine if you're just validating the shape of props that JSX consumes, but proptypes won't be able to check the types of the rest of your codebase. That's where TypeScript, Flow or a language like Reason come into play.

Also, with TypeScript, the refactor story is much better, there's intellisense etc.

Collapse
 
nickytonline profile image
Nick Taylor • Edited

In fact, if you use VS Code or even Code Sandbox for your JavaScript based projects, all the refactoring capabilities under the hood are thanks to the TypeScript language service, since JavaScript is valid TypeScript.

Thread Thread
 
nathansebhastian profile image
Nathan Sebhastian

Oh I see.. been considering TypeScript for a long time, but haven't learned it because I don't know what tangible benefit it offers. I think I will look into your source code for better understanding. I'm looking forward to your TS post 😁

Thread Thread
 
nickytonline profile image
Nick Taylor

In the meantime, check out this post. There's some great TypeScript resources in there.