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.
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 😁
In the meantime, check out this post. There's some great TypeScript resources in there.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.