re: Any contribution to Open Source is valuable VIEW POST

FULL DISCUSSION
 

Hi Nick, can you enlighten me on the benefits of using Typescript on React? If it's about type, don't we have propTypes for that? Thanks

 

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.

 

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.

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 😁

code of conduct - report abuse